<template>
    <view style="width: 100%;">
        <view>
            <uni-nav-bar left-icon="back" right-text="菜 单" :title="headerTitle" shadow="flase"
                         background-color="#1E90FF" fixed="true"
                         @click-left="clickLeft" @click-right="clickRight">
            </uni-nav-bar>
        </view>
        <hj-dragabledrawer :options="options" ref="dragBox" @open="afterOpen" @close="afterClose">
            <view style="width: 100%;height: 100%;margin-top: 30%;">
                <uni-collapse accordion="true">
                    <view style="padding: 20upx;" @click="showPageChange(12)"
                          :class="{showClass:showPage[12]}">
                        申报信息
                    </view>
                    <view style="padding: 20upx;" @click="showPageChange(1)" :class="{showClass:showPage[1]}">
                        基本信息
                    </view>

                    <uni-collapse-item title="现场检疫" v-if="billQuarantine.baselineData==1" animation="true">
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(2)"
                              :class="{showClass:showPage[2]}">
                            工作记录单
                        </view>
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(3)"
                              :class="{showClass:showPage[3]}">协助临床检查情况
                        </view>
                    </uni-collapse-item>

                    <!-- <uni-collapse-item title="实验检测" v-if="billQuarantine.quarantineType==1" animation="true">
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(4)"
                              :class="{showClass:showPage[4]}">
                            工作记录单
                        </view>
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(5)"
                              :class="{showClass:showPage[5]}">
                            采样送检通知
                        </view>
                    </uni-collapse-item> -->
					<!-- <view v-if="billQuarantine.quarantineResult==1&&billWorkRecord.certification==1 ||billWorkRecord.certification==2 || billQuarantine.quarantineType==1 || billWorkRecord.qualificationType == 2" style="padding: 20upx;text-align: center;" @click="showPageChange(5)"
					      :class="{showClass:showPage[5]}">
					    采样送检通知
					</view> -->
					
					<view v-if="billWorkRecord.laboratoryCase == 1 || billWorkRecord.laboratoryCase == 2" style="padding: 20upx;" @click="showPageChange(5)"
					      :class="{showClass:showPage[5]}">
					    采样送检通知
					</view>
                    <!-- <view v-if="billQuarantine.quarantineResult==1&&billWorkRecord.certification==1 || billQuarantine.quarantineType==1"
                          style="padding: 20upx;" @click="showPageChange(9)"
                          :class="{showClass:showPage[9]}">检疫合格证A
                    </view>
                    <view v-if="billQuarantine.quarantineResult==1&&billWorkRecord.certification==2"
                          style="padding: 20upx;" @click="showPageChange(10)"
                          :class="{showClass:showPage[10]}">检疫合格证B
                    </view> -->
					<view v-if="billWorkRecord.quaState == 1 && billWorkRecord.qualificationType == 1 && billWorkRecord.certification == 1"
					      style="padding: 20upx;" @click="showPageChange(9)"
					      :class="{showClass:showPage[9]}">检疫合格证A
					</view>
					<view v-if="billWorkRecord.quaState == 1 && billWorkRecord.qualificationType == 1 && billWorkRecord.certification == 2"
					      style="padding: 20upx;" @click="showPageChange(10)"
					      :class="{showClass:showPage[10]}">检疫合格证B
					</view>

                    <uni-collapse-item title="不合格管理" v-if="billQuarantine.quarantineResult==2" animation="true">
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(6)"
                              :class="{showClass:showPage[6]}">
                            检疫处理通知单
                        </view>
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(7)"
                              :class="{showClass:showPage[7]}"
                              v-show="billWorkRecord.general==1">
                            隔离通知书
                        </view>
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(11)"
                              :class="{showClass:showPage[9]}"
                              v-show="billQuarantine.segregationId!=null&&billQuarantine.desegregationId==null">复查
                        </view>
                        <view style="padding: 20upx;text-align: center;" @click="showPageChange(8)"
                              :class="{showClass:showPage[8]}"
                              v-show="billQuarantine.desegregationId!=null">解除隔离通知书
                        </view>
                    </uni-collapse-item>
                </uni-collapse>
            </view>
        </hj-dragabledrawer>
        <view class="items content">
            <view v-show="showPage[3]" style="width: 100%;">
                <view class="title">编号：
                    <span v-text="billAssist.assCode"></span>
                </view>
                <view>检查时间:</view>
                <picker style="border: 1px solid #909399;" mode="date" value="YYYY-MM-DD" @change="bindAssTimeDateChange" class="pickerstyle">
                    <view style="font-size: 105%;margin-top: 1%;">{{billAssist.assTime | dateFormat}}</view>
                </picker>

                <view class="title">养殖场:</view>
                <input v-model="billAssist.decCompany" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">货主:</view>
                <input v-model="billAssist.assShipper" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">水生动物种类:</view>
                <input v-model="breedName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">规格/数量:</view>
                <input v-model="billAssist.assSpecOrNum" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">协助渔业官方兽医:</view>
                <input v-model="billAssist.veterinaryName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">检疫地点:</view>
                <input v-model="billAssist.assAddress" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view>
                    <view class="title" style="display:inline-block;width: 30%;">
                        异常情况:
                    </view>
                    <view class="title" style="display:inline-block;">
                        <radio-group style="margin-bottom: 3%;" @change="assType">
                            <label>
                                <radio value="1" :checked="1==billAssist.assType">未发现</radio>
                            </label>
                            <label>
                                <radio value="2" :checked="2==billAssist.assType">发现</radio>
                            </label>
                        </radio-group>
                    </view>
                </view>

                <view class="title">协助检疫人员：</view>
                <input v-model="billAssist.assQuaper"/>
                <view class="title">所在单位：</view>
                <input v-model="billAssist.assCompany"/>

                <view class="title">签发日期:</view>
                <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" class="pickerstyle" @change="bindBillAssistRecordTimeDateChange">
                    <view style="font-size: 105%;margin-top: 1%;">{{billAssist.recordTime | dateFormat }}</view>
                </picker>

                <view style="margin-top: 5%;" class="title">
                    <button type="primary" :disabled="billQuarantine.assId !== null" size="default" @click="addOrUpdateAssis()">提交</button>
                    <button type="warn" style="margin-top: 10px;" v-show="billQuarantine.assId !== null" size="default" @click="addOrUpdateAssis()">修改</button>
					<button type="warn" style="margin-top: 10px;" @click="toPrint(2)"
                            :disabled="billQuarantine.assId==null">打印
                    </button>
                </view>
                <view style="margin-top: 20px;">
                    <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                          v-for="(file,index) in assAccessory" :key="index">
                        <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                               @tap="fjClick(assAccessory,index)"></image>
                        <image src="../../static/del.png" @click="delFile(2,index)" mode=""
                               style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                    </view>
                    <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                          v-if="assAccessory.length<=3">
                        <image src="../../static/xj.png"
                               style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                               @click="GetFileAndUp2Baidu(2)"></image>
                    </view>
                </view>
            </view>

            <view v-if="showPage[1]" style="width: 100%;">
                <view class="title">编号：<span v-text="billWorkRecord.recCode"></span>
                </view>
                <view class="title">
                    水生动物卫生监督所：
                </view>
                <input v-model="billWorkRecord.authority" name="input" disabled
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">
                    报检时间：
                </view>
                <picker mod33332221111111e="date" value="YYYY-MM-DD" class="pickerstyle" @change="bindDecTimeTimeChange" disabled=""
                        style="border: 1px solid #ccc;color: #ccc;">
                    <view style="font-size: 105%;margin-top: 1%;">{{billWorkRecord.decTime | dateFormat}}</view>
                </picker>
                <!-- <QSPickerDate variableName="date" title="报检时间" :value="new Date()"  placherhold="请选择" /> -->
                <view class="title">
                    检疫时间：
                </view>


                <picker mode="date" value="YYYY-MM-DD" class="pickerstyle" @change="bindQuaTimeTimeChange" disabled=""
                        style="border: 1px solid #ccc;color: #ccc;">
                    <view style="font-size: 105%;margin-top: 1%;">{{billWorkRecord.quaTime | dateFormat}}</view>
                </picker>

                <view class="title">
                    货主姓名：
                </view>
                <input v-model="billWorkRecord.shipperName" name="input" disabled
                       style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    身份证号：
                </view>
                <input v-model="billWorkRecord.decCard" name="input" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    联系电话：
                </view>
                <input v-model="billWorkRecord.decMobeltel" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    检疫品种：
                </view>
                <input v-model="breedName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    规格及数量：
                </view>
                <input v-model="billWorkRecord.specOrNum" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    用途：
                </view>
                <!-- <input v-model="billWorkRecord.decPurpose" /> -->
                <picker class="pickerstyle" mode="selector" @change="decPurposeChange" :range="usageTypeList"
                        range-key="dicName"
                        disabled="" style="border: 1px solid #ccc;color: #ccc;">
                    <view style="font-size: 105%;margin-top: 1%;">{{billWorkRecord.decPurpose}}</view>
                </picker>

                <view class="title">
                    养殖场、村、原驻地或者捕获地名称：
                </view>
                <input v-model="billWorkRecord.decAddress"/>

                <view class="title">
                    动物来源：
                </view>
                <picker class="pickerstyle" mode="selector" @change="decSourceChange" :range="animalSourceList"
                        range-key="dicName"
                        style="border: 1px solid #ccc;color: #ccc;" disabled="">
                    <view style="font-size: 105%;margin-top: 1%;">{{billWorkRecord.decSource}}</view>
                </picker>

                <view class="title">
                    检疫地点：
                </view>
                <input v-model="billWorkRecord.accAddress" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    启运地点：
                </view>
                <input v-model="billWorkRecord.locDeparture" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    到达地点：
                </view>
                <input v-model="billWorkRecord.locArrival" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view class="title">
                    运载工具牌号：
                </view>
                <input v-model="billWorkRecord.carNo"/>
                <view class="title" style="text-align: center;">
                    查验材料及疫情调查：
                </view>

                <view class="title">
                    《水域滩涂养殖证》等权证号：
                </view>
                <input v-model="billWorkRecord.warrant"/>
                <view class="title">
                    或者相关协议：
                </view>
                <input v-model="billWorkRecord.agreementName"/>
                <view class="title">
                    《水产苗种生产许可证》证号：
                </view>
                <input v-model="billWorkRecord.plNumber"/>

                <view class="title">
                    过去12个月内引种来源地《动物检疫合格证明》证号：
                </view>
                <input v-model="billWorkRecord.aqCertificate"/>

                <view class="title">
                    《水产养殖管理记录》是否符合要求：
                </view>
                <view class="title">
                    <radio-group @change="isCultureRecord">
                        <label>
                            <radio value="1" :checked="billWorkRecord.cultureRecord==1">符合</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="billWorkRecord.cultureRecord==2">不符合</radio>
                        </label>
                    </radio-group>
                </view>
                <view class="title">
                    过去12个月内相关水生动物疫病情况：
                </view>
                <input v-model="billWorkRecord.epidemicSituation"/>
                <view class="title">
                    与其他养殖场所是否有物理隔离设施（用于合法捕获的野生水产苗种）：
                </view>
                <view class="title">
                    <radio-group @change="isbarrierFacility">
                        <label>
                            <radio value="1" :checked="billWorkRecord.barrierFacility==1">有</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="billWorkRecord.barrierFacility==2">无</radio>
                        </label>
                    </radio-group>
                </view>
                <view class="title">
                    <button type="warn" @click="addOrUpdateWork(1)">修改</button>
                </view>
            </view>

            <view v-if="showPage[2]" style="width: 100%;">
                <view class="title">
                    检疫对象:
                </view>
				<input style="display: inline-block;width: 75%;float: left;" @tap="showTree" v-model="fields" placeholder="请选择" disabled=""/>
				<button type="primary" style="float: right;width: 20%;" @click="empty">清空</button>
				<tki-tree ref="tkitree"  multiple="true" :range="diseaseArr" foldAll="false" rangeKey="name" @confirm="diseaseTreeConfirm"
				 @cancel="treeCancel"></tki-tree>
                <!-- <view style="">
                    <addressd @changes="childClick" :addressData="addressData"></addressd>
                </view> -->
				<!-- <view class="title">
				    检疫对象：
				</view>
				<input v-model="breedName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/> -->

                <view class="title" style="display:inline-block;width: 35%;">
                    群体检查:
                </view>
                <view class="title" style="display:inline-block;">
                    <radio-group @change="isgroupResult" class="title">
                        <label>
                            <radio value="1" :checked="1== billWorkRecord.groupResult">正常</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="2==billWorkRecord.groupResult">不正常</radio>
                        </label>
                    </radio-group>
                </view>
                <br>
                <view class="title" style="display:inline-block;width: 35%;">
                    外观:
                </view>
                <view class="title" style="display:inline-block;">
                    <radio-group @change="IssingleAppearance" class="title">
                        <label>
                            <radio value="1" :checked="1==billWorkRecord.singleAppearance">正常</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="2==billWorkRecord.singleAppearance">不正常</radio>
                        </label>
                    </radio-group>
                </view>
                <br>
                <view class="title" style="display:inline-block;width: 35%;">
                    解剖:
                </view>
                <view class="title" style="display:inline-block;">
                    <radio-group @change="issingleAnatomy" class="title">
                        <label>
                            <radio value="1" :checked="1==billWorkRecord.singleAnatomy">正常</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="2==billWorkRecord.singleAnatomy">不正常</radio>
                        </label>
                    </radio-group>
                </view>
                <br>
                <view class="title" style="display:inline-block;width: 35%;">
                    显微镜检查:
                </view>
                <view class="title" style="display:inline-block;">
                    <radio-group @change="issingleMicroscope" class="title">
                        <label>
                            <radio value="1" :checked="1==billWorkRecord.singleMicroscope">正常</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="2==billWorkRecord.singleMicroscope">不正常</radio>
                        </label>
                    </radio-group>
                </view>
                <view class="title">
                    不正常情况说明:
                    <textarea v-model="billWorkRecord.singleResult" style="width: 100%;border: 1px solid #909399;"/>
                </view>

                <view class="title">
                    试剂盒快检:
                </view>
                <view class="title">
                    <radio-group @change="reagentResult" class="title">
                        <label>
                            <radio value="1" :checked="1==billWorkRecord.reagentResult">阴性</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="2==billWorkRecord.reagentResult">阳性</radio>
                        </label>
                        <label>
                            <radio value="3" :checked="3==billWorkRecord.reagentResult">不需要</radio>
                        </label>
                        <label>
                            <radio value="4" :checked="4==billWorkRecord.reagentResult">国家暂未实施</radio>
                        </label>
                    </radio-group>
                </view>
                <bjx-form
                        labelType="inline"
                        :rules="rules"
                        :form="billWorkRecord"
                        ref="form">
                    </br>
                    <view class="waterStyle" style="margin-right: 10px;margin-top: 10upx;">
                        <bjx-form-item labelType="block" label="水温:" prop="wp" style="font-size: 105%;">
                            <input v-model="billWorkRecord.wp"/>
                        </bjx-form-item>
                    </view>
                    <view class="waterStyle" style="margin-top: 10upx;">

                        <bjx-form-item labelType="block" label="溶解氧:" prop="disso">
                            <input v-model="billWorkRecord.disso"/>
                        </bjx-form-item>
                    </view>
                    <view class="waterStyle" style="margin-right: 10px;">

                        <bjx-form-item labelType="block" label="酸碱度:" prop="ph">
                            <input v-model="billWorkRecord.ph"/>
                        </bjx-form-item>
                    </view>
                    <view class="waterStyle">
                        <bjx-form-item labelType="block" label="氨氮:" prop="nh">

                            <input v-model="billWorkRecord.nh"/>
                        </bjx-form-item>
                    </view>

                    <view class="waterStyle" style="margin-right: 10px;">

                        <bjx-form-item labelType="block" label="亚硝酸盐:" prop="no2">
                            <input v-model="billWorkRecord.no2"/>
                        </bjx-form-item>
                    </view>
                    <view class="waterStyle">
                        <bjx-form-item labelType="block" label="亚硝酸盐:" prop="o2">
                            <input v-model="billWorkRecord.o2"/>
                        </bjx-form-item>
                    </view>
                    <view>
                        <view class="title" style="display:inline-block;border: 1px solid #BEBEBE;width: 100%;padding-left:10px;">
                            <bjx-form-item labelType="inline" label="实验室检测:" labelWidth="250">
								<radio-group @change="isLaboratory">
                                    <label>
                                        <radio value="1" :checked="1==billWorkRecord.laboratory"
                                               :disabled="billQuarantine.quarantineResult!=0"/>
                                        需要
                                    </label>
                                    <label>
                                        <radio value="2" :checked="2==billWorkRecord.laboratory"
                                               :disabled="billQuarantine.quarantineResult!=0"/>
                                        不需要
                                    </label>
                                </radio-group>
                            </bjx-form-item>
							<view class="title" style="display:inline-block;">
							    <bjx-form-item labelType="inline" label="检测情况:" labelWidth="250">
									<radio-group @change="isLaboratoryCase">
							            <label>
							                <radio value="1" :checked="1==billWorkRecord.laboratoryCase"
							                       :disabled="billWorkRecord.laboratory == 2 || billQuarantine.quarantineResult!=0"/>
							                合格
							            </label>
							            <label>
							                <radio value="2" :checked="2==billWorkRecord.laboratoryCase"
							                       :disabled="billWorkRecord.laboratory == 2 || billQuarantine.quarantineResult!=0"/>
							                不合格
							            </label>
							        </radio-group>
							    </bjx-form-item>
							</view>
                        </view>
						<!-- 检疫结果处理 -->
						<view class="title" style="display:inline-block;border: 1px solid #BEBEBE;width: 100%;padding-left:10px;">
						    <bjx-form-item labelType="inline" label="检疫结果处理:" labelWidth="250">
						        <radio-group @change="isquaState">
						            <label>
						                <radio value="1" :checked="1==billWorkRecord.quaState"
						                       :disabled="billWorkRecord.laboratory == 1 && billWorkRecord.laboratoryCase == 2 || billQuarantine.quarantineResult!=0"/>
						                合格
						            </label>
						            <label>
						                <radio value="2" :checked="2==billWorkRecord.quaState"
						                       :disabled="billQuarantine.quarantineResult!=0"/>
						                不合格
						            </label>
						        </radio-group>
						    </bjx-form-item>
							<!-- 检疫结果处理合格 -->
							<view v-if="billWorkRecord.quaState == 1" style="border: 1px solid #BEBEBE;margin-bottom: 10px;padding-left: 5px;margin-right: 10px;">
								<view class="title" style="display:inline-block;">
										<!-- <radio-group @change="isQualificationType"> -->
								        <radio-group @change="isQualificationType">
								            <label>
								                <radio value="1" :checked="1==billWorkRecord.qualificationType" :disabled="billQuarantine.quarantineResult!=0"/>
								                出具
								            </label>
								            <label>
								                <radio value="2" :checked="2==billWorkRecord.qualificationType" :disabled="billQuarantine.quarantineResult!=0"/>
								                更换
								            </label>
								        </radio-group>
								</view>
								<view class="title" style="margin-bottom: 10px;" v-if="billWorkRecord.qualificationType==1">
								    <view class="title" style="display:inline-block;">
								        <bjx-form-item labelType="inline" label="请选择:"
								                       labelWidth="250">
								            <radio-group @change="isCertification">
								                <label>
								                    <radio value="1" :checked="1==billWorkRecord.certification" :disabled="billQuarantine.quarantineResult!=0"/>
								                    动物A证
								                </label>
								                <label>
								                    <radio value="2" :checked="2==billWorkRecord.certification" :disabled="billQuarantine.quarantineResult!=0"/>
								                    动物B证
								                </label>
								            </radio-group>
								        </bjx-form-item>
								    </view>
								</view>
								<view class="title" v-if="billWorkRecord.qualificationType==2" style="margin-bottom: 10px;border-bottom: 1px solid #CCCCCC;">
								    <bjx-form-item labelType="block" label="《动物检疫合格证明》:">
								        <input style="padding: 10px 0; margin: 0 10px;" v-model="billWorkRecord.certification"/>
								    </bjx-form-item>
								</view>
							</view>
							<!-- 检疫结果处理不合格 -->
							<view v-if="billWorkRecord.quaState == 2" style="border: 1px solid #BEBEBE;padding-left: 5px;padding-bottom: 5px;margin-bottom: 5px;">
								<view class="title">
								    数量:
								</view>
								<view class="title">
								    <input style="padding: 10px 0; margin: 0 10px;" :disabled="billQuarantine.quarantineResult!=0" v-model="billWorkRecord.unqualNumber"/>
								</view>
								<view class="title">
								    不合格情况:
								</view>
								<view class="title">
								    <input style="padding: 10px 0; margin: 0 10px;" :disabled="billQuarantine.quarantineResult!=0" v-model="billWorkRecord.unqualSituation"/>
								</view>
								
								<view class="title">
								    一般处理:
								    <radio-group @change="general" class="title">
								        <label>
								            <radio value="1" :checked="billWorkRecord.general==1" :disabled="billQuarantine.quarantineResult!=0"/>
								            隔离
								        </label>
								        <label>
								            <radio value="2" :checked="billWorkRecord.general==2" :disabled="billQuarantine.quarantineResult!=0"/>
								            治疗
								        </label>
								        <label>
								            <radio value="3" :checked="3==billWorkRecord.general" :disabled="billQuarantine.quarantineResult!=0"/>
								            其他
								        </label>
								    </radio-group>
								</view>
								<view class="title">
								    无害化处理
								</view>
								<view class="title">
								    <radio-group @change="harmless" class="title">
								        <label>
								            <radio value="1" :checked="1==billWorkRecord.harmless" :disabled="billQuarantine.quarantineResult!=0"/>
								            焚烧
								        </label>
								        <label>
								            <radio value="2" :checked="2==billWorkRecord.harmless" :disabled="billQuarantine.quarantineResult!=0"/>
								            化制
								        </label>
								        <label>
								            <radio value="3" :checked="3==billWorkRecord.harmless" :disabled="billQuarantine.quarantineResult!=0"/>
								            掩埋
								        </label>
								        <label>
								            <radio value="4" :checked="4==billWorkRecord.harmless" :disabled="billQuarantine.quarantineResult!=0"/>
								            发酵
								        </label>
								        <label>
								            <radio value="5" :checked="5==billWorkRecord.harmless" :disabled="billQuarantine.quarantineResult!=0"/>
								            其他
								        </label>
								    </radio-group>
								</view>
								<view class="title">
								    数量:
								</view>
								<view class="title">
								    <input style="padding: 10px 0; margin: 0 10px;" :disabled="billQuarantine.quarantineResult!=0" v-model="billWorkRecord.harNumber"/>
								</view>
								<view class="title">
								    出具《检疫处理通知单》编号:
								</view>
								<view class="title">
								    <input style="padding: 10px 0; margin: 0 10px;color: #ccc;" disabled="true" v-model="billWorkRecord.treatmentNoticeNo"/>
								</view>
							</view>
						</view>
                    </view>
                    <view class="title" style="margin-bottom: 5%;">
                        <view class="title">渔业官方兽医签字：</view>
                        <view style="width: 100%;">
                            <view style="width: 40%;float: left;">
                                <image style="width: 100%; height: 35px;border-radius: 5px;" mode="aspectFit"
                                       :src="billWorkRecord.vetSignature"></image>
                            </view>
                            <view style="width: 60%;float: right;text-align: right;">
                                <span style="margin-right: 10px;">电子签名</span>
                                <switch @change="workSwitchChange" :checked="billWorkRecord.vetSignature!=null"
                                        :disabled="vetData.signature==null"/>
                            </view>
                        </view>
                        <view class="title" style="clear: both;">渔业官方兽医证件号：</view>
                        <input v-model="billWorkRecord.vetCertificate" disabled="true"
                               style="padding: 10px 0; margin: 0 10px;color: #ccc;"/>
                    </view>
                </bjx-form>
                <button type="primary" :disabled="billQuarantine.quarantineResult !== 0" @click="addOrUpdateWork(2)" style="margin-top: 10px;">提交</button>
				<button type="warn" v-show="billQuarantine.quarantineResult !== 0" @click="addOrUpdateWork(2)" style="margin-top: 10px;">修改</button>
                <button style="margin-top: 10px;" type="warn" @click="toPrint(1)"
                        :disabled="billQuarantine.quarantineResult==0">打印
                </button>

                <view style="margin-top: 20px;">
                    <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                          v-for="(file,index) in workAccessory" :key="index">
                        <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                               @tap="fjClick(workAccessory,index)"></image>
                        <image src="../../static/del.png" @click="delFile(1,index)" mode=""
                               style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                    </view>
                    <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                          v-if="workAccessory.length<=3">

                        <image src="../../static/xj.png"
                               style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                               @click="GetFileAndUp2Baidu(1)"></image>
                    </view>
                </view>

            </view>

            <view v-if="showPage[9]" style="width: 100%;">
                <view class="title">系统编号：{{billCertification.code}}</view>
                <view class="title">货主：</view>
                <input v-model="billWorkRecord.shipperName" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">联系电话：</view>
                <input v-model="billWorkRecord.decMobeltel" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">动物种类：</view>
                <input v-model="breedName" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">数量及单位：</view>
                <input v-model="billCertification.numUnit" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">启运地点：</view>
                <input v-model="billWorkRecord.locDeparture" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">到达地点：</view>
                <input v-model="billWorkRecord.locArrival" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">用 途：</view>
                <input v-model="billWorkRecord.decPurpose" disabled=""
                       style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">承 运 人:</view>
                <input v-model="billCertification.carrier"/>
                <view class="title">承 运 人电话：</view>
                <input v-model="billCertification.carrierTel"/>
                <view class="title">运载方式:</view>
                <view class="title">
                    <radio-group @change="deliveryWayChange">
                        <label>
                            <radio value="1" :checked="billCertification.deliveryWay==1">公路</radio>
                        </label>
                        <label>
                            <radio value="2" :checked="billCertification.deliveryWay==2">铁路</radio>
                        </label>
                        <label>
                            <radio value="3" :checked="billCertification.deliveryWay==3">水路</radio>
                        </label>
                        <label>
                            <radio value="4" :checked="billCertification.deliveryWay==4">航空</radio>
                        </label>
                    </radio-group>
                </view>
                <view class="title">运载工具牌号：</view>
                <input v-model="billCertification.plateNumber"/>
                <view class="title">运载工具消毒情况：</view>
                <input v-model="billCertification.sterilizeCondition"/>

                <view class="title">到达有效时间(日内)：</view>
                <input v-model="billCertification.dayValid"/>
                <view class="title">签发日期：</view>
                <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" class="pickerstyle" @change="billCertificationTimeChange">
                    <view style="font-size: 105%;margin-top: 1%;">{{billCertification.issuanceTime | dateFormat}}</view>
                </picker>
                <view class="title">水产苗种生产许可证号：</view>
                <input v-model="billWorkRecord.plNumber" disabled style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">牲畜耳标号：</view>
                <t-table>
                    <t-tr>
                        <t-th>质量合格证号</t-th>
                        <t-th>规格</t-th>
                        <t-th>数量</t-th>
                    </t-tr>
                    <t-tr v-for="(item,index) in billCertificationVO" :key="index">
                        <t-td><input v-model="item.qcNumber"/></t-td>
                        <t-td><input v-model="item.spec"/></t-td>
                        <t-td><input v-model="item.number"/></t-td>
                    </t-tr>
                </t-table>
                <view style="text-align: center; margin-top: 10px; ">
                    <button type="primary" size="mini" style="margin-right: 20px;" @click="addtd"
                            :disabled="billCertificationVOLength==2">添加
                    </button>
                    <button type="warn" size="mini" style="margin-left: 20px;" @click="deltd">删除</button>
                </view>
                <view class="title">备注:</view>
                <textarea
                        style="border: 1px solid #909399; width: 100%; height: 100px;box-shadow: inset 0 1px 1px rgba(0,0,0,.075);"
                        v-model="billCertification.remarks"></textarea>
                <view class="title">合格证号（No）:</view>
                <input v-model="billCertification.certificateNumber"/>
                <view style="margin-top: 3%;">
                    <button type="primary" :disabled="billQuarantine.qualificationAId !== null" @click="addOrUpdateBillCertification">提交</button>
                    <button type="warn" style="margin-top: 10px;" v-show="billQuarantine.qualificationAId !== null" @click="addOrUpdateBillCertification">修改</button>
					<button type="warn" style="margin-top: 10px;" @click="toPrint(7)"
                            :disabled="billQuarantine.qualificationAId==null">打印
                    </button>
                    <view style="margin-top: 20px;">
                        <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                              v-for="(file,index) in qualificationAAccessory" :key="index">
                            <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                                   @tap="fjClick(qualificationAAccessory,index)"></image>
                            <image src="../../static/del.png" @click="delFile(4,index)" mode=""
                                   style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                        </view>
                        <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                              v-if="qualificationAAccessory.length<=3">
                            <image src="../../static/xj.png"
                                   style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                                   @click="GetFileAndUp2Baidu(4)"></image>
                        </view>
                    </view>
                </view>
            </view>
            <view v-if="showPage[4]" style="width: 100%;">
                <bjx-form
                        labelType="inline"
                        :rules="rules"
                        :form="billWorkRecord"
                        ref="form">
                    <view class="title" style="display:inline-block;">
                        <bjx-form-item labelType="inline" label="检测结果:" prop="quaState" labelWidth="250">
                            <radio-group @change="isquaStateok2">
                                <label>
                                    <radio value="1" :checked="1==billWorkRecord.quaState"
                                           :disabled="billQuarantine.quarantineResult!=0"/>
                                    合格
                                </label>
                                <label>
                                    <radio value="2" :checked="2==billWorkRecord.quaState"
                                           :disabled="billQuarantine.quarantineResult!=0"/>
                                    不合格
                                </label>
                            </radio-group>
                        </bjx-form-item>
                    </view>

                    <!-- 不合格 -->
                    <view v-if="billWorkRecord.quaState==2">
                        <!-- 如果选择的是不合格 -->
                        <view class="title">
                            数量:
                        </view>
                        <input v-model="billWorkRecord.unqualNumber"/>
                        <view class="title">
                            不合格情况:
                        </view>
                        <input v-model="billWorkRecord.unqualSituation"/>
                        <view class="title">
                            一般处理:
                            <radio-group @change="general">
                                <label>
                                    <radio value="1" :checked="billWorkRecord.general==1"/>
                                    隔离
                                </label>
                                <label>
                                    <radio value="2" :checked="billWorkRecord.general==2"/>
                                    治疗
                                </label>
                                <label>
                                    <radio value="3" :checked="3==billWorkRecord.general"/>
                                    其他
                                </label>
                            </radio-group>
                            </bjx-form-item>
                        </view>
                        <view class="title">
                            无害化处理
                        </view>
                        <view class="title">
                            <radio-group @change="harmless">
                                <label>
                                    <radio value="1" :checked="1==billWorkRecord.harmless"/>
                                    焚烧
                                </label>
                                <label>
                                    <radio value="2" :checked="2==billWorkRecord.harmless"/>
                                    化制
                                </label>
                                <label>
                                    <radio value="3" :checked="3==billWorkRecord.harmless"/>
                                    掩埋
                                </label>
                                <label>
                                    <radio value="4" :checked="4==billWorkRecord.harmless"/>
                                    发酵
                                </label>
                                <label>
                                    <radio value="5" :checked="5==billWorkRecord.harmless"/>
                                    其他
                                </label>
                            </radio-group>
                        </view>
                        <view class="title">
                            数量:
                        </view>
                        <input v-model="billWorkRecord.harNumber"/>
                        <view class="title">
                            出具《检疫处理通知单》编号:
                        </view>
                        <input v-model="billWorkRecord.treatmentNoticeNo"/>
                    </view>

                    <!-- 合格 -->
                    <view v-if="billWorkRecord.quaState==1">
                        <view class="title" style="display:inline-block;">
                            <bjx-form-item labelType="inline" label="检疫合格处理:" labelWidth="250">
                                <radio-group @change="isQualificationType">
                                    <label>
                                        <radio value="1" :checked="1==billWorkRecord.qualificationType"/>
                                        出具
                                    </label>
                                    <label>
                                        <radio value="2" :checked="2==billWorkRecord.qualificationType"/>
                                        更换
                                    </label>
                                </radio-group>
                            </bjx-form-item>
                        </view>

                        <view v-if="billWorkRecord.qualificationType==1">
                            <view class="title" style="display:inline-block;">
                                <bjx-form-item labelType="inline" label="请选择:" prop="certification" labelWidth="250">
                                    <radio-group @change="isCertification">
                                        <label>
                                            <radio value="1" :checked="1==billWorkRecord.certification"/>
                                            动物A证
                                        </label>
                                        <label>
                                            <radio value="2" :checked="2==billWorkRecord.certification"/>
                                            动物B证
                                        </label>
                                    </radio-group>
                                </bjx-form-item>
                            </view>
                        </view>

                        <view class="title" v-if="billWorkRecord.qualificationType==2">
                            <bjx-form-item labelType="block" label="《动物检疫合格证明》:" prop="certification">
                                <input v-model="billWorkRecord.certification"/>
                            </bjx-form-item>
                        </view>
                    </view>
                    <view class="title">渔业官方兽医签字:</view>
                    <view style="width: 100%;">
                        <view style="width: 40%;float: left;">
                            <image style="width: 100%; height: 35px;border-radius: 5px;" mode="aspectFit"
                                   :src="billWorkRecord.vetSignature"></image>
                        </view>
                        <view style="width: 60%;float: right;text-align: right;">
                            <span style="margin-right: 10px;">电子签名</span>
                            <switch @change="workSwitchChange" :checked="billWorkRecord.vetSignature!=null"
                                    :disabled="vetData.signature==null"/>
                        </view>
                    </view>
                    <view class="title" style="clear:both;">渔业官方兽医证件号:</view>
                    <input v-model="billWorkRecord.vetCertificate" disabled=""
                           style="border: 1px solid #ccc;color: #ccc;"/>
                </bjx-form>
                <button type="primary" :disabled="billQuarantine.quarantineResult !== 0 || billWorkRecord.laboratory == 1" @tap="addOrUpdateWork(2)" style="margin-top: 10px;">提交</button>
                <button type="warn" v-show="billQuarantine.quarantineResult !== 0 || billWorkRecord.laboratory == 1" @tap="addOrUpdateWork(2)" style="margin-top: 10px;">修改</button>
				<button style="margin-top: 10px;" type="warn" @click="toPrint(1)"
                        :disabled="billQuarantine.quarantineResult==0">打印
                </button>
                <view style="margin-top: 20px;">
                    <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                          v-for="(file,index) in workAccessory" :key="index">
                        <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                               @tap="fjClick(workAccessory,index)"></image>
                        <!-- <span style="margin-left: 20px;" @click="delFile(1,index)">删除</span> -->
                        <image src="../../static/del.png" @click="delFile(1,index)" mode=""
                               style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                    </view>
                    <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                          v-if="workAccessory.length<=3">

                        <image src="../../static/xj.png"
                               style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                               @click="GetFileAndUp2Baidu(1)"></image>
                    </view>
                </view>
            </view>
            <view v-show="showPage[5]" style="width: 100%;">

                <view class="title">编号:<span v-text="billSamplNotice.snCode"></span></view>
                <view class="title">货主：</view>
                <input v-model="billSamplNotice.snShipper"/>
                <view class="title">申报单编号:</view>
                <input v-model="billSamplNotice.decCode"/>

                <view class="title">送检原因:</view>
                <checkbox-group @change="samplChecked">
                    <label v-for="(item,index) in reasonsInsList" :key="index">
                        <view>
                            <checkbox :value="item.value" :checked="item.checked"></checkbox>
                            {{item.name}}
                        </view>
                    </label>
                </checkbox-group>

                <view class="title">检疫对象:</view>
                <input v-model="fields" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">要求时间:</view>
                <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" class="pickerstyle" @change="snDataChange">
                    <view style="margin-top: 1%;font-size: 105%;">{{billSamplNotice.snData | dateFormat}}</view>
                </picker>
                <view class="title">疫控中心:</view>
                <input v-model="billSamplNotice.snMechanism"/>
                <view class="title">渔业官方兽医签字:</view>
                <view style="width: 100%;">
                    <view style="width: 40%;float: left;">
                        <image style="width: 100%; height: 35px;border-radius: 5px;" mode="aspectFit"
                               :src="billSamplNotice.vetSignature"></image>
                    </view>
                    <view style="width: 60%;float: right;text-align: right;">
                        <span style="margin-right: 10px;">电子签名</span>
                        <switch @change="billSamplSwitchChange" :checked="billSamplNotice.vetSignature!=null"
                                :disabled="vetData.signature==null"/>
                    </view>
                </view>
                <view class="title" style="clear: both;">渔业官方兽医证件号:</view>
                <input v-model="billSamplNotice.vetCertificate"/>

                <view class="title">水生动物卫生监督所：</view>
                <input v-model="billSamplNotice.authority" disabled style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">印章：</view>
                <view>
                    <view style="float:left;width: 40%;">
                        <picker class="pickerstyle" mode="selector" @change="sampSignaturelChange"
                                :range="organization.signature"
                                range-key="name">
                            <view style="font-size: 105%;margin-top: 1%;">
                                {{samplNoticeSignatureName==null?'无':samplNoticeSignatureName}}
                            </view>
                        </picker>
                    </view>
                    <view style="float:left;width: 56%;height: 115px;border: 1px solid #ccc;margin-left: 10px;border-radius: 5px;">
                        <image :src="billSamplNotice.signature" mode="aspectFit"
                               style="width: 100%;height: 115px;"></image>
                    </view>
                </view>
                <view class="title" style="clear: both;">签发日期：</view>
                <picker mode="date" style="border:1px solid #909399" class="pickerstyle" @change="bindDecTimeTimeChange">
                    <view style="margin-top: 1%;font-size: 105%;">{{billSamplNotice.snTime | dateFormat}}</view>
                </picker>
                <view>
                    <button type="primary" :disabled="billQuarantine.samplNoticeId !== null" style="margin-top: 10px;" @click="saveBillSamplNotice">提交</button>
                    <button type="warn" v-show="billQuarantine.samplNoticeId !== null" style="margin-top: 10px;" @click="saveBillSamplNotice">修改</button>
					<button type="warn" style="margin-top: 10px;" @click="toPrint(3)"
                            :disabled="billQuarantine.samplNoticeId==null">打印
                    </button>
                    <view style="margin-top: 20px;">
                        <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                              v-for="(file,index) in samplNoticeAccessory" :key="index">
                            <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                                   @tap="fjClick(samplNoticeAccessory,index)"></image>
                            <image src="../../static/del.png" @click="delFile(3,index)" mode=""
                                   style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                        </view>
                        <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                              v-if="samplNoticeAccessory.length<=3">
                            <image src="../../static/xj.png"
                                   style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                                   @click="GetFileAndUp2Baidu(3)"></image>
                        </view>
                    </view>
                </view>
            </view>


            <view v-if="showPage[6]" style="width: 100%;">
                <view class="title"> 编号：<span v-text="billHandle.hanCode"></span></view>
                <view class="title">货主：</view>
                <input v-model="billWorkRecord.shipperName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">检疫种类：</view>
                <input v-model="breedName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">根据：</view>
                <textarea
                        style="width: 100%; height: 100px; border: 1px solid #909399;box-shadow: inset 0 1px 1px rgba(0,0,0,.075);"
                        v-model="billHandle.hanReason"></textarea>
                <view class="title">处理方式：</view>
                <textarea
                        style="width: 100%; height: 200px; border: 1px solid #909399;box-shadow: inset 0 1px 1px rgba(0,0,0,.075);"
                        v-model="billHandle.hanMethods"></textarea>
                <view class="title">渔业官方兽医签字：</view>
                <view style="width: 100%;">
                    <view style="width: 40%;float: left;">
                        <image style="width: 100%; height: 35px;border-radius: 5px;" mode="aspectFit"
                               :src="billHandle.vetSignature"></image>
                    </view>
                    <view style="width: 60%;float: right;text-align: right;">
                        <span style="margin-right: 10px;">电子签名</span>
                        <switch @change="billHandleSwitchChange" :checked="billHandle.vetSignature!=null"
                                :disabled="vetData.signature==null"/>
                    </view>
                </view>
                <view class="title" style="clear: both;">监督所:</view>
                <input v-model="billHandle.hanMechanism" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">印章：</view>
                <view>
                    <view style="float:left;width: 40%;">
                        <picker class="pickerstyle" mode="selector" @change="billHandleSignaturelChange"
                                :range="organization.signature"
                                range-key="name">
                            <view style="font-size:105%;margin-top: 1%;">
                                {{billHandleSignatureName==null?'无':billHandleSignatureName}}
                            </view>
                        </picker>
                    </view>
                    <view style="float:left;width: 56%;height: 115px;border: 1px solid #ccc;margin-left: 10px;border-radius: 5px;">
                        <image :src="billHandle.signature" mode="aspectFit" style="width: 100%;height: 115px;"></image>
                    </view>
                </view>
                <view class="title">签发日期:</view>
                <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" class="pickerstyle" @change="billHandleissuanceDateTimeChange">
                    <view style="font-size: 105%;margin-top: 1%;">{{billHandle.issuanceDate | dateFormat}}</view>
                </picker>

                <button type="primary" :disabled="billQuarantine.handleId !== null" size="default" style="margin-top:5%; margin-bottom: 3%;"
                        @click="addOrUpdateBiiHandle">提交
                </button>
				<button type="warn" v-show="billQuarantine.handleId !== null" size="default" style="margin-top:5%; margin-bottom: 3%;"
				        @click="addOrUpdateBiiHandle">修改
				</button>
                <button type="warn" style="" @click="toPrint(4)" :disabled="billQuarantine.handleId==null">打印</button>
                <view style="margin-top: 20px;">
                    <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                          v-for="(file,index) in handleAccessory" :key="index">
                        <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                               @tap="fjClick(handleAccessory,index)"></image>
                        <image src="../../static/del.png" @click="delFile(6,index)" mode=""
                               style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                    </view>
                    <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                          v-if="handleAccessory.length<=3">
                        <image src="../../static/xj.png"
                               style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                               @click="GetFileAndUp2Baidu(6)"></image>
                    </view>
                </view>
            </view>

            <view v-if="showPage[7]" style="width: 100%;">
                <view class="title">编号:<span v-text="billSegregation.segCode"></span></view>
                <view class="title">货主:</view>
                <input v-model="billSegregation.segShipper" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">因你单位:
                    <checkbox-group @change="segSourceChecked">
                        <label v-for="(item,index) in items" :key="index">
                            <view>
                                <checkbox :value="item.value" :checked="item.checked"></checkbox>
                                {{item.name}}
                            </view>
                        </label>
                    </checkbox-group>
                </view>
                <view class="title">
                    <view>隔离开始时间：</view>

                    <view>
                        <picker mode="date" value="YYYY-MM-DD" @change="bindSegStartTimeChange" class="pickerstyle">
                            <view style="font-size: 105%;margin-top: 1%;"> {{billSegregation.segStartTime |
                                dateFormat('YYYY-MM-DD')}}
                            </view>
                        </picker>
                    </view>

                    <view class="title">隔离结束时间：</view>
                    <view>
                        <picker mode="date" value="YYYY-MM-DD" @change="bindSegEndTime" class="pickerstyle">
                            <view style="font-size: 105%;margin-top: 1%;">{{billSegregation.segEndTime |
                                dateFormat('YYYY-MM-DD')}}
                            </view>
                        </picker>
                    </view>
                </view>
                <view class="title">隔离区:</view>
                <view><input v-model="billSegregation.isolationPlace"/></view>


                <view style="margin: 20px 0;">
                    <view>
                        <text>动物参数:</text>
                    </view>
                    <uni-collapse v-for="(item,index) in showIsolationSpec" :key="index" accordion="true">
                        <uni-collapse-item :title="index+1" style="background-color: #efeff4;">
                            <view>序号:<input v-model="item.no"/></view>
                            <!-- <view>水生动物种类:<input v-model="item.category"/></view> -->
							<view>水生动物种类:<input v-model="item.category"/></view>
                            <view>规格:<input v-model="item.spec"/></view>
                            <view>数量:<input v-model="item.num"/></view>
                            <view>输出地:<input v-model="item.exportAddress"/></view>
                            <view>输出单位:<input v-model="item.exportUnit"/></view>
                            <view>备注:<input v-model="item.remarks"/></view>
                        </uni-collapse-item>
                    </uni-collapse>
                </view>
                <view style="text-align: center; margin-top: 20px;">
                    <button type="primary" size="mini" @click="addSpec" style="margin-right: 20px;"
                            :disabled="showIsolationSpecLength==4">添加
                    </button>
                    <button type="warn" size="mini" @click="rmSpec" style="margin-left: 20px;">刪除</button>
                </view>

                <view style="margin-top: 8%;">
                    <view class="title">执法人员：</view>
                    <input v-model="billSegregation.enforcers1"/>
                    <view class="title">执法证号：</view>
                    <input v-model="billSegregation.enforcCard1"/>
                    <view class="title">执法人员：</view>
                    <input v-model="billSegregation.enforcers2"/>
                    <view class="title">执法证号：</view>
                    <input v-model="billSegregation.enforcCard2"/>
                </view>
                <view class="title">
                    监督所：
                </view>
                <input v-model="billSegregation.segMechanism" disabled style="border: 1px solid #ccc;color: #ccc;"/>
                <view class="title">印章：</view>
                <view>
                    <view style="float:left;width: 40%;">
                        <picker class="pickerstyle" mode="selector" @change="billSegregationChange"
                                :range="organization.signature"
                                range-key="name">
                            <view style="font-size: 105%;margin-top: 1%;">
                                {{billSegregationName==null?'无':billSegregationName}}
                            </view>
                        </picker>
                    </view>
                    <view style="float:left;width: 56%;height: 115px;border: 1px solid #ccc;margin-left: 10px;border-radius: 5px;">
                        <image :src="billSegregation.signature" mode="aspectFit"
                               style="width: 100%;height: 115px;"></image>
                    </view>
                </view>
                <view class="title">签发日期：</view>
                <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" @change="bindIssuanceDate" class="pickerstyle">
                    <view style="font-size:105%;margin-top: 1%;">{{billSegregation.issuanceDate |
                        dateFormat('YYYY-MM-DD')}}
                    </view>
                </picker>
                <view style="margin-top: 5%;">
                    <!-- <button type="primary" size=" default" @click="addOrUpdateSeg(billSegregation)">保存</button> -->
                    <button type="primary" :disabled="billQuarantine.segregationId !== null" size="default" @click="addOrUpdateSeg()">提交</button>
					<button type="warn" v-show="billQuarantine.segregationId !== null" size="default" style="margin-top: 2%;" @click="addOrUpdateSeg()">修改</button>
                    <button style="margin-top: 2%;" type="warn" size="default" @click="toPrint(5)"
                            :disabled="billQuarantine.segregationId==null">打印
                    </button>
                    <view style="margin-top: 20px;">
                        <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                              v-for="(file,index) in segregationAccessory" :key="index">
                            <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                                   @tap="fjClick(segregationAccessory,index)"></image>
                            <image src="../../static/del.png" @click="delFile(7,index)" mode=""
                                   style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                        </view>
                        <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                              v-if="segregationAccessory.length<=3">
                            <image src="../../static/xj.png"
                                   style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                                   @click="GetFileAndUp2Baidu(7)"></image>
                        </view>
                    </view>
                </view>
                <view style="text-align: center; margin-top: 10%;">送达回证</view>

                <view>案由:</view>
                <textarea v-model="billReceipt.causeaction" disabled=""
                          style="border: 1px solid #ccc;color: #ccc;width: 100%;height: 200px;"></textarea>

                <view>受送达人:</view>
                <input v-model="billReceipt.deliverPer" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                <view>送达单位:</view>
                <input v-model="billReceipt.deliverMechanism" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                <button style="margin-top: 2%;" type="warn" size="default" @click="toPrint(9)"
                        :disabled="billQuarantine.segregationId==null">打印
                </button>
            </view>

            <view v-if="showPage[8]" style="width: 100%;">
                <view class="items">
                    <view style="margin-top:10px;">编号:<span v-text="billDesegregation.desegCode"></span></view>

                    <view>货主:</view>
                    <view><input v-model="billDesegregation.desegShipper" disabled=""
                                 style="border: 1px solid #ccc;color: #ccc;"/></view>

                    <view>原因:</view>
                    <checkbox-group @change="segSourceChecked">
                        <label v-for="(item,index) in items" :key="index">
                            <view>
                                <checkbox :value="item.value" :checked="item.checked" disabled></checkbox>
                                {{item.name}}
                            </view>
                        </label>
                    </checkbox-group>
                    <view>隔离时间:</view>
                    <view class="geStyle" disabled=""
                          style="border: 1px solid #ccc;color: #ccc;font-size: 105%;padding: 1% 0 0 10px;">
                        {{billDesegregation.segStartTime | dateFormat}}至{{billDesegregation.segEndTime|dateFormat}}
                    </view>
                    <view>隔离区:</view>
                    <view><input v-model="billDesegregation.segAddress" disabled=""
                                 style="border: 1px solid #ccc;color: #ccc;"/></view>
                    <view>作出隔离日期:</view>
                    <view class="geStyle" disabled=""
                          style="border: 1px solid #ccc;color: #ccc;font-size: 105%;padding: 1% 0 0 10px;">
                        {{billDesegregation.segTime | dateFormat}}
                    </view>
                    <view>隔离通知单编号:</view>
                    <view><input v-model="billDesegregation.segCode" disabled=""
                                 style="border: 1px solid #ccc;color: #ccc;"/></view>
                    <view>解除日期:</view>
                    <view class="geStyle" disabled=""
                          style="border: 1px solid #ccc;color: #ccc;font-size: 105%;padding: 1% 0 0 10px;">
                        {{billDesegregation.desegTime|dateFormat}}
                    </view>
                    <view style="margin: 20px 0;">
                        <view>
                            <text style="text-align: center;">动物参数:</text>
                        </view>
                        <uni-collapse v-for="(item,index) in showIsolationSpec" :key="index" accordion="true">
                            <uni-collapse-item :title="index+1" style="background-color: #efeff4;">
                                <view>序号:<input v-model="item.no" disabled style="border: 1px solid #ccc;color: #ccc;"/>
                                </view>
                                <view>水生动物种类:<input v-model="breedName" disabled
                                                    style="border: 1px solid #ccc;color: #ccc;"/></view>
                                <view>规格:<input v-model="item.spec" disabled
                                                style="border: 1px solid #ccc;color: #ccc;"/></view>
                                <view>数量:<input v-model="item.num" disabled
                                                style="border: 1px solid #ccc;color: #ccc;"/></view>
                                <view>输出地:<input v-model="item.exportAddress" disabled
                                                 style="border: 1px solid #ccc;color: #ccc;"/></view>
                                <view>输出单位:<input v-model="item.exportUnit" disabled
                                                  style="border: 1px solid #ccc;color: #ccc;"/></view>
                                <view>备注:<input v-model="item.remarks" disabled
                                                style="border: 1px solid #ccc;color: #ccc;"/></view>
                            </uni-collapse-item>
                        </uni-collapse>
                    </view>
                    <view class="title">
                        监督所：
                    </view>
                    <input v-model="billDesegregation.desegMechanism" disabled
                           style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">印章：</view>
                    <view>
                        <view style="float:left;width: 40%;">
                            <picker class="pickerstyle" mode="selector" @change="billDesegregationChange"
                                    :range="organization.signature"
                                    range-key="name" disabled style="border: 1px solid #ccc;">
                                <view style="font-size: 105%;margin-top: 1%;" v-text="billDesegregationName"></view>
                            </picker>
                        </view>
                        <view style="float:left;width: 56%;height: 115px;border: 1px solid #ccc;margin-left: 10px;border-radius: 5px;">
                            <image :src="billDesegregation.signature" mode="aspectFit"
                                   style="width: 100%;height: 115px;"></image>
                        </view>
                    </view>

                    <view>签发日期:</view>
                    <view class="geStyle" disabled=""
                          style="border: 1px solid #ccc;color: #ccc;font-size: 105%;padding: 1% 0 0 10px;">
                        {{billDesegregation.issuanceDate | dateFormat}}
                    </view>

                    <view style="margin-top: 10%;">
                        <button style="margin-top: 2%;" type="warn" size="default" @click="toPrint(6)"
                                :disabled="billQuarantine.desegregationId==null">打印
                        </button>
                        <view style="margin-top: 20px;">
                            <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                                  v-for="(file,index) in desegregationAccessory" :key="index">
                                <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                                       @tap="fjClick(desegregationAccessory,index)"></image>
                                <image src="../../static/del.png" @click="delFile(8,index)" mode=""
                                       style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                            </view>
                            <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                                  v-if="desegregationAccessory.length<=3">
                                <image src="../../static/xj.png"
                                       style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                                       @click="GetFileAndUp2Baidu(8)"></image>
                            </view>
                        </view>
                    </view>
                    <view style="text-align: center; margin-top: 10%;">送达回证</view>

                    <view>案由:</view>
                    <textarea v-model="billReceipt2.causeaction" disabled=""
                              style="border: 1px solid #ccc;color: #ccc;width: 100%;height: 200px;"></textarea>

                    <view>受送达人:</view>
                    <input v-model="billReceipt2.deliverPer" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                    <view>送达单位:</view>
                    <input v-model="billReceipt2.deliverMechanism" disabled=""
                           style="border: 1px solid #ccc;color: #ccc;"/>
                    <button style="margin-top: 2%;" type="warn" size="default" @click="toPrint(10)"
                            :disabled="billQuarantine.segregationId==null">打印
                    </button>
                </view>
            </view>

            <view v-if="showPage[10]" style="width: 100%;">
                <view class="items">
                    <view class="title">系统编号：<span v-text="billCertification.code"></span></view>
                    <view class="title">货主：</view>
                    <input v-model="billWorkRecord.shipperName" disabled=""
                           style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">联系电话：</view>
                    <input v-model="billWorkRecord.decMobeltel" disabled=""
                           style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">动物种类：</view>
                    <input v-model="breedName" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">数量及单位：</view>
                    <input v-model="billCertification.numUnit" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">启运地点：</view>
                    <input v-model="billWorkRecord.locDeparture" disabled=""
                           style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">到达地点：</view>
                    <input v-model="billWorkRecord.locArrival" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">用 途：</view>
                    <input v-model="billWorkRecord.decPurpose" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>

                    <view class="title">水产苗种生产许可证号：</view>
                    <input v-model="billWorkRecord.plNumber" disabled="" style="border: 1px solid #ccc;color: #ccc;"/>
                    <view class="title">牲畜耳标号：</view>
                    <t-table>
                        <t-tr>
                            <t-th>质量合格证号</t-th>
                            <t-th>规格</t-th>
                            <t-th>数量</t-th>
                        </t-tr>
                        <t-tr v-for="(item,index) in billCertificationVO" :key="index">
                            <t-td><input v-model="item.qcNumber"/></t-td>
                            <t-td><input v-model="item.spec"/></t-td>
                            <t-td><input v-model="item.number"/></t-td>
                        </t-tr>
                    </t-table>
                    <view>
                        <view style="text-align: center; margin-top: 10px; ">
                            <button type="primary" size="mini" style="margin-right: 20px;" @click="addtd"
                                    :disabled="billCertificationVOLength==2">添加
                            </button>
                            <button type="warn" size="mini" style="margin-left: 20px;" @click="deltd">删除</button>
                        </view>
                    </view>
                    <view class="title">签发日期：</view>
                    <picker mode="date" style="border: 1px solid #909399;" value="YYYY-MM-DD" class="pickerstyle"
                            @change="billCertificationissuanceTimeChange">
                        <view style="font-size: 105%;margin-top: 1%;">{{billCertification.issuanceTime | dateFormat}}
                        </view>
                    </picker>
                    <view class="title">合格证号（No）:</view>
                    <input v-model="billCertification.certificateNumber"/>
                    <view style="margin-top: 3%;">
                        <button type="primary" :disabled="billQuarantine.qualificationBId !== null" @click="addOrUpdateBillCertification">提交</button>
						<button type="warn" style="margin-top: 10px;" v-show="billQuarantine.qualificationBId !== null" @click="addOrUpdateBillCertification">修改</button>
                        <button type="warn" style="margin-top: 10px;" @click="toPrint(8)"
                                :disabled="billQuarantine.qualificationBId==null">打印
                        </button>
						
                        <view style="margin-top: 20px;">
                            <view style="display: inline-block;width: 100px;height: 100px;border: 1px solid #ccc;margin-right: 10px;position: relative;"
                                  v-for="(file,index) in qualificationBAccessory" :key="index">
                                <image :src="file.url" mode="aspectFit" style="width: 100px;height: 100px;"
                                       @tap="fjClick(desegregationAccessory,index)"></image>
                                <image src="../../static/del.png" @click="delFile(5,index)" mode=""
                                       style="width: 20px;height: 20px;position: absolute;right: 2%;"></image>
                            </view>
                            <view style="width: 100px;height: 100px;border: 1px solid #ccc;display: inline-block;"
                                  v-if="qualificationBAccessory.length<=3">
                                <image src="../../static/xj.png"
                                       style="width: 50px;height: 50px;display: inline-block;margin:25px;"
                                       @click="GetFileAndUp2Baidu(5)"></image>
                            </view>
                        </view>
						
                    </view>
                </view>
            </view>

            <view v-if="showPage[12]" style="width: 100%;">
                <view class="items">
                    <view class="title">编号:<span v-text="declare.code"/></view>
                    <view class="title">货主单位:<span v-text="declare.companyName"/></view>
                    <view class="title">货主姓名:<span v-text="declare.shipperName"/></view>
                    <view class="title">联系电话:<span v-text="declare.shipperMobile"/></view>
                    <view class="title">水生动物种类: <span>{{breedName}}</span></view>
                    <view class="title">规格及数量: <span>{{declare.specOrNum}}</span></view>
                    <view v-for="item in animalSourceList" :key="item.dicId">
                        <span v-if="item.dicValue==declare.source">来源: {{item.dicName}}</span>
                    </view>

                    <view v-for="item in usageTypeList" :key="item.dicId">
                        <span v-if="item.dicValue==declare.purpose">用途： {{item.dicName}}</span>
                    </view>
                    <view class="title">启运时间: <span>{{declare.decTimeDeparture | dateFormat}}</span></view>
                    <view class="title">启运地点: <span>{{declare.departureAddress}}</span></view>
                    <view class="title">到达地点: <span>{{declare.arrivalAddress}}</span></view>
                    <view class="title">申报时间: <span>{{declare.decTime | dateFormat}}</span></view>

                    <hr style="margin-top: 3%">
                    <view class="title">受理状态:
                        <span v-if="declare.accState==1">受理</span>
                        <span v-else>不受理</span>
                    </view>
                    <view class="title">派员时间:
                        <span v-if="declare.accState==1">
                         {{declare.desigTime}}
                    </span>
                    </view>
                    <view class="title">检疫地址:
                        <span v-if="declare.accState==1" >{{declare.accAddress}}</span>
                    </view>
                    <view class="title">理由:
                        <span v-if="declare.accState==2" v-text="declare.accReason"></span>
                    </view>
                    <view class="title">经办人:
                        <span >{{declare.accOperator}}</span>
                    </view>
                    <view class="title">联系电话:
                        <span >{{declare.accMobeltel}}</span>
                    </view>
                    <view class="title">处理时间:
                        <span >{{declare.accTime}}</span>
                    </view>
					<view>
						<span></span>
					</view>
					<view class="title">附件:
					<view v-for="(file,index) in urlarr" :key="index" style="display: inline-block;border: 1px solid #909399;margin-right: 10upx;">
						<image mode="aspectFit" :src="file.attachment" style="width: 100upx;height: 100upx;display: inline-block;"></image>
					</view>
					</view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
	import tkiTree from '@/components/tki-tree/tki-tree.vue';
    import sunUiUpimg from '@/components/sunui-upimg/sunui-upimg.vue';
    import uniGrid from "@/components/uni-grid/uni-grid.vue"
    import uniGridItem from "@/components/uni-grid-item/uni-grid-item.vue"

    import tTable from '@/components/t-table/t-table.vue';
    import tTh from '@/components/t-table/t-th.vue';
    import tTr from '@/components/t-table/t-tr.vue';
    import tTd from '@/components/t-table/t-td.vue';
    import wPicker from "@/components/w-picker/w-picker.vue";
    import uniIcons from '@dcloudio/uni-ui/lib/uni-icons/uni-icons.vue'
    import uniCollapse from "../../components/uni-collapse/uni-collapse.vue"
    import uniCollapseItem from "../../components/uni-collapse-item/uni-collapse-item.vue";
    import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue"
    import addressd from "@/components/jm-address/jm-address.vue"
    import bjxForm from '@/components/bjx-form/bjx-form.vue'
    import bjxFormItem from '@/components/bjx-form/bjx-form-item.vue'
    import hjDragabledrawer from '@/components/hj-dragabledrawer/hj-dragabledrawer.vue' //这里修改下插件的相对路径
    import QSApp from '@/components/QS-inputs-split/js/app.js';

    let dragBox;
    import {
        mapState
    } from 'vuex'

    import loginjs from '../../login.js'

    export default {

        components: {
            'sunui-upimg': sunUiUpimg,
            uniGrid,
            uniGridItem,
            uniCollapse,
            uniCollapseItem,
            tTable,
            tTh,
            tTr,
            tTd,
            uniNavBar,
            wPicker,
            addressd,
            uniIcons,
            bjxForm,
            bjxFormItem,
            hjDragabledrawer,
			tkiTree
        },
        data() {
            return {
                baseUrl: this.$store.state.baseUrl,
				flag:false,
                value: true,
				urlarr:[],
                options: {
                    visible: false,
                    width: 50
                },
				//检疫对象数据
				diseaseArr:[],
				//品种数据
				breedArr:[],
				fields:'',
                //申报信息
                declare: {
                    id: null,
                    code: null,
                    decType: null,
                    companyId: null,
                    breedName: null,
                    specOrNum: null,
                    spec: null,
                    num: null,
                    source:null,
                    purpose: null,

                    companyName: null,
                    shipperName: null,
                    shipperMobile: null,

                    decTimeDeparture: null,
                    decTime: null,
                    decType: null,
                    decState: null,

                    departureAddress: null,
                    arrivalAddress: null,
                    accAddress: null,

                    desigTime: null,
                    accDesignator: null,
                    accCode: null,
                    accReason: null,
                    accOperator: null,
                    accMobeltel: null,
                    accTime: null,
                    accState: null,
                    attachment: null,

                    departureProvince: null,
                    departureCity: null,
                    departureArea: null,
                    departureStreet: null,
                    departureDetail: null,

                    arrivalProvince: null,
                    arrivalCity: null,
                    arrivalArea: null,
                    arrivalStreet: null,
                    arrivalDetail: null,

                    accProvince: null,
                    accCity: null,
                    accArea: null,
                    accStreet: null,
                    accDetail: null,
                    signature: null
                },
                tempFileList: [],
                diseaseArr: [],
                addressData: {
                    coname: '鱼类疾病',
                    ctname: '病毒性疾病',
                    csname: '鲤春病毒血症'
                },
                index: 0,

                Authorization: '',
                qid: null,
                decTimeNoformat: '', //未格式化的时间
                quaTimeNoformat: '', //未格式化的时间
                showPage: [],
                showMenu: false,
                headerTitle: '基本信息',
                //动物种类
                dropdownList: [{
                    label: "",
                    value: "",
                    children: [{
                        label: "",
                        value: ""
                    }]
                }],
                reasonsIns: [],
                //用途
                usageTypeList: [],
                //动物来源
                animalSourceList: [],
                billWorkRecord: {
                    id: null,
                    recCode: '', //编号
                    authority: '',
                    decTime: new Date(), //报检时间
                    quaTime: new Date(), //检疫时间
                    breedName: null, //动物种类
                    shipperName: null, //货主名称
                    decMobeltel: null, //联系电话
                    decCard: null, //货主身份证null
                    specOrNum: null, //规格/数量
                    decSource: null, //来源
                    decPurpose: null, //用途名称
                    accAddress: null, //检疫地点
                    disease: null, //检疫对象
                    locDeparture: null, //启运地点
                    decAddress: null, //捕获名称
                    locArrival: null, //到达地址
                    carNo: null, //运载工具牌号

                    warrant: null, //等权证号
                    agreementName: null, //相关协议名称
                    plNumber: null, //水产苗种生产许可证号
                    aqCertificate: null, //动物检疫合格证号
                    cultureRecord: null, //水产养殖管理记录 否符合要求 1符合 2不符合
                    epidemicSituation: null, //过去12个月内相关水生动物疫病情况
                    barrierFacility: null //与其他养殖场所是否有物理隔离设施 1是 2否"
                },
                rules: {
                    wp: {required: false, rule: 'type:number|length:~,4|min:-10|max:40', message: '水温为-10~40的数字'},
                    disso: {required: false, rule: 'type:number', message: '溶解氧为数字'},
                    ph: {required: false, rule: 'type:number', message: '酸碱度为数字'},
                    nh: {required: false, rule: 'type:number', message: '氨氮为数字'},
                    no2: {required: false, rule: 'type:number', message: '亚硝酸盐为数字'},
                    o2: {required: false, rule: 'type:number', message: '化学耗氧量为数字'},
                    laboratory: {required: true},
                    quaState: {required: true},
                    qualificationType: {required: true, msg: '请选择动物A证或动物B证'},
                    certification: {required: true}

                }
                ,
                showSegSource: [],
                showIsolationSpec: [],
                showDragBox: true,
                items: [{
                    value: '1',
                    name: '跨省（自治区、直辖市）引进的种用水生动物',
                    checked: false
                }, {
                    value: '2',
                    name: '养殖、出售或者运输合法捕获的野生水产苗种',
                    checked: false
                }, {
                    value: '3',
                    name: '出售或者运输水产苗种需要补检疫',
                    checked: false
                }, {
                    value: '4',
                    name: '养殖、出售、运输水产苗种经检疫不合格需要隔离',
                    checked: false
                }],
                billCertificationVO: [],
                billCertificationVOLength: 0,
                showIsolationSpecLength: 0,
                billSegregation: {
                    // "主键
                    id: null,
                    // "隔离通知书编号
                    segCode: '',
                    // "申请单编号
                    decCode: null,
                    // "货主
                    segShipper: null,
                    // "货主单位
                    segCompany: null,
                    // "水生物来源
                    segSource: null,
                    // "隔离区
                    isolationPlace: null,
                    // "隔离开始时间
                    segStartTime: null,
                    // "隔离结束时间
                    segEndTime: null,
                    // "执法人员
                    enforcers1: null,
                    // "执法证件号
                    enforcCard1: null,
                    // "执法人员
                    enforcers2: null,
                    // "执法证件号
                    enforcCard2: null,
                    // "监督所
                    segMechanism: null,
                    // "签发日期
                    issuanceDate: new Date(),
                    // "各种规格
                    isolationSpec: null
                },

                timeformat: '',

                billQuarantine: {
                    //"主键")
                    id: null,
                    //"申报单主键")
                    decId: null,

                    //"申报单编号")
                    decCode: null,

                    //"申报单状态")
                    decState: null,

                    //"申报单模板")
                    decTemp: null,

                    //"受理单编号")
                    accCode: null,

                    //"受理单状态0 1 2")
                    accState: null,

                    //"受理单模板")
                    accTemp: null,

                    //"协助临床检查情况说明主键")
                    assId: null,

                    //"协助临床检查情况说明编号")
                    assCode: null,

                    //"协助临床检查情况说明模板")
                    assTemp: null,

                    //"现场检测时间")
                    sceneTime: null,

                    //"实验室检查时间")
                    laboratoryTime: null,

                    //"检疫类型 0 现场检疫 1 实验室检疫")
                    quarantineType: null,

                    //"检疫结果 0检疫中 1 合格 2不合格")
                    quarantineResult: null,

                    //"基本资料 0未填写 1已填写")
                    baselineData: 0,


                    //"检疫采样送检通知单编号")
                    samplNoticeId: null,

                    //"检疫采样送检通知单模板")
                    samplNoticeTemp: null,

                    //"工作记录单主键")
                    workId: null,

                    /* 工作记录附件 */
                    workAccessory: null,

                    /* 协助临床检查情况附件 */
                    assAccessory: null,

                    /* 采样送检通知附件 */
                    samplNoticeAccessory: null,

                    /* 动物A证附件对*/
                    qualificationAAccessory: null,

                    /*  动物B证附件*/
                    qualificationBAccessory: null,

                    /* 检疫处理通知单附件 */
                    handleAccessory: null,

                    /* 隔离通知单附件 */
                    segregationAccessory: null,

                    /* 解除隔离通知单附件 */
                    desegregationAccessory: null,

                    /* 隔离通知单回证附件 */
                    receipt1Accessory: null,

                    /* 解除隔离通知单回证附件 */
                    receipt2Accessory: null,

                    //"工作记录单模板")
                    workTemp: null,

                    //"隔离通知单id")
                    segregationId: null,

                    //"隔离通知单模板")
                    segregationTemp: null,

                    //"检疫处理通知单编号")
                    handleId: null,

                    //"检疫处理通知单模板")
                    handleTemp: null,

                    //"送达回证1编号")
                    receipt1Id: null,

                    //"送达回证1模板")
                    receipt1Temp: null,

                    //"送达回证编号")
                    receipt2Id: null,

                    //"送达回证模板")
                    receipt2Temp: null,

                    //"送达回证编号")
                    receipt3Id: null,

                    //"送达回证模板")
                    receipt3Temp: null,

                    //"解除隔离通知单编号")
                    desegregationId: null,

                    //"解除隔离通知单模板")
                    desegregationTemp: null,

                    //"合格证明状态（出具、更换） 1 出具 2更换")
                    qualificationType: null,

                    //"合格证明A")
                    qualificationAId: null,

                    //"合格证明A模板")
                    qualificationATemp: null,

                    //"合格证明b")
                    qualificationBId: null,

                    //"合格证明b模板")
                    qualificationBTemp: null,


                    //"是否有效 0：有效 1：失效")
                    isEnable: null,

                    //"工作记录单状态")
                    workState: null
                },
                assAccessory: [],
                workAccessory: [],
				breedName:'',
                samplNoticeAccessory: [],
                qualificationAAccessory: [],
                qualificationBAccessory: [],
                handleAccessory: [],
                segregationAccessory: [],
                desegregationAccessory: [],
                billAssist: {
                    //协助临床检查情况主键")
                    id: null,

                    //协助临床检查情况编号")默认编号
                    assCode: '',

                    //申请单编号")
                    decCode: null,

                    //协助时间")默认时间
                    assTime: new Date("yyyy-MM-dd HH:mm"),

                    //养殖场")
                    decCompany: null,

                    //货主")
                    assShipper: null,

                    //品种id")
                    breedId: null,

                    //品种名称")
                    breedName: null,

                    //规格/数量")
                    assSpecOrNum: null,

                    //兽医主键")
                    veterinaryId: null,

                    //兽医")
                    veterinaryName: null,


                    //现场检疫地点")
                    assAddress: null,

                    //发现状态 1 未发现 0发现")
                    assType: null,

                    //协助检疫人员")
                    assQuaper: null,

                    //协助检疫人员所在单位")
                    assCompany: null,

                    //记录时间")
                    recordTime: null

                },
                //检疫采样送检通知
                //送检原因
                reasonsInsList: [],

                billSamplNoticeDiseaseName: '',
                billSamplNotice: {
                    //"主键")
                    id: null,

                    //"采样送检单编号")
                    snCode: '',

                    //"申请单编号")
                    decCode: null,


                    //"货主")
                    snShipper: null,


                    //"货主单位")
                    snCompany: null,

                    //"送检原因")
                    reasonsIns: null,


                    //"检疫对象")
                    diseaseId: null,

                    //"检疫对象")
                    diseaseName: null,

                    //"要求时间")
                    snData: new Date,

                    //"疫控中心")
                    snMechanism: null,

                    //"渔业官方兽医id")
                    veterinaryId: null,

                    //"渔业官方兽医名称")
                    veterinaryName: null,

                    //"送检单时间")
                    snTime: new Date,
                    vetSignature: null

                },
                billCertification: {
                    //主键")
                    id: null,

                    //编号")
                    code: "",

                    //货主name")
                    shipperName: null,

                    //货主电话")
                    shipperTel: null,

                    //动物种类")
                    animalType: null,

                    //数量及单位")
                    numUnit: null,

                    //启运地点")
                    departureAddress: null,

                    //到达地点")
                    arrivalAddress: null,

                    //用  途")
                    purpose: null,

                    //承运人")
                    carrier: null,

                    //承运人电话")
                    carrierTel: null,

                    //运载方式 1公路 2铁路 3水路 4航空")
                    deliveryWay: null,

                    //运载工具牌号")
                    plateNumber: null,

                    //运载工具消毒情况")
                    sterilizeCondition: null,

                    //到达时间 日内到达有效。")
                    arrivalTime: null,

                    //签发日期")
                    issuanceTime: new Date(),

                    //兽医id")
                    veterinarianId: null,

                    //兽医name")
                    veterinarianName: null,

                    //水产苗种生产许可证号")
                    productionLicenseNumber: null,

                    //牲畜耳标号")
                    animalEarLabel: null,

                    //备 注")
                    remarks: null,

                    //合格证类型 1 A证 2B证")
                    certificationType: null
                },

                /* 水产检疫处理对象 */
                billHandleSignatureName: null,
                billHandle: {
                    id: null,
                    hanCode: '',
                    hanShipper: null,
                    hanCompany: null,
                    breedId: null,
                    breedName: null,
                    hanReason: null,
                    hanMethods: null,
                    hanMechanism: null,
                    veterinaryId: null,
                    veterinaryName: null,
                    issuanceDate: '',
                    createId: null,
                    createDate: null,
                    updateId: null,
                    updateDate: null,
                    isEnable: null,
                    vetSignature: null,
                    signature: null
                },
                billReceipt: {
                    id: null,
                    causeaction: null,
                    deliverPer: null,
                    deliverMechanism: null

                },
                billReceipt2: {
                    id: null,
                    causeaction: null,
                    deliverPer: null,
                    deliverMechanism: null
                },
                //隔离通知
                billDesegregation: {
                    desegCode: "",
                    desegShipper: null,
                    desegCompany: null,
                    desegSource: [],
                    segStartTime: '',
                    segEndTime: '',
                    segAddress: null,
                    segTime: '',
                    desegTime: '',
                    desegMechanism: null,
                    unisolationSpec: null,
                    issuanceDate: ''
                },
                billSegregationName: null,
                billDesegregationName: null,
                vetData: {
                    fullName: null,
                    vetNumber: null,
                    signature: null
                },
                organization: {
                    institutionName: null,
                    signature: null
                },
                samplNoticeSignatureName: null,
            }
        },
        onReady() {
            dragBox = this.$refs.dragBox;
        },
        filters: {
           formatDate(time) {
			   var date=new Date(time)
			  var fmt='yyyy年MM月dd日'
			    if (/(y+)/.test(fmt)) {
			           fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
			       }
			       var o = {
			           'M+': date.getMonth() + 1,
			           'd+': date.getDate(),
			           'h+': date.getHours(),
			           'm+': date.getMinutes(),
			           's+': date.getSeconds()
			       }
			       for (var k in o) {
			           if (new RegExp(`(${k})`).test(fmt)) {
			               var str = o[k] + ''
			               fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str))
			           }
			       }
			       return fmt
            },
        },
        computed:{
			
			breedNameStrFun() {
				let data=this.declare.breedName
			    if (data == null) {
			        return ''
			    }
			    var item = JSON.parse(data);
			    var str = '';
			    for (var i = 0; i < item.length; i++) {
			        if (i < item.length - 1) {
			            str += item[i] + '/';
			        } else {
			            str += item[i]
			        }
			    }
			    //this.breedNameStr = str;
			    return str;
			},
            //拼接起运地点
            departureStr: function () {
                if(this.declare.departureDetail === null || this.declare.departureDetail === ""){
                    return this.declare.departureAddress
                }else {
                    return this.declare.departureAddress+ ''+ this.declare.departureDetail
                }
            },

            arrivalStr: function () {
                if(this.declare.arrivalDetail === null || this.declare.arrivalDetail === ""){
                    return this.declare.arrivalAddress

                }else {
                    return this.declare.arrivalAddress+ ''+ this.declare.arrivalDetail
                }
            },
            accStr: function () {
                if(this.declare.accDetail === null || this.declare.accDetail === ""){
                    return this.declare.accAddress
                }else {
                    return this.declare.accAddress+ ''+ this.declare.accDetail
                }
            }
        },
        methods: {
            fjClick(data, index) {
                var tempData = []
                data.forEach((d, i) => {
                    if (index == i) {
                        tempData.unshift(d.url)
                    } else {
                        tempData.push(d.url)
                    }
                })
                uni.previewImage({
                    urls: tempData
                })
            },
            billDesegregationChange(e) {
                var temp = this.organization.signature[e.detail.value]
                this.billDesegregation.signature = temp.url
                this.billDesegregationName = temp.name
            },
            billSegregationChange(e) {
                var temp = this.organization.signature[e.detail.value]
                this.billSegregation.signature = temp.url
                this.billSegregationName = temp.name
            },
            billHandleSignaturelChange(e) {
                var temp = this.organization.signature[e.detail.value]
                this.billHandle.signature = temp.url
                this.billHandleSignatureName = temp.name
            },

            sampSignaturelChange(e) {

                var temp = this.organization.signature[e.detail.value]
                this.billSamplNotice.signature = temp.url
                this.samplNoticeSignatureName = temp.name
            },

            billHandleSwitchChange(e) {
                if (e.target.value) {
                    this.billHandle.vetSignature = this.vetData.signature
                } else {
                    this.billHandle.vetSignature = null
                }
            },
            billSamplSwitchChange(e) {
                if (e.target.value) {
                    this.billSamplNotice.vetSignature = this.vetData.signature
                } else {
                    this.billSamplNotice.vetSignature = null
                }
            },
            workSwitchChange(e) {
                if (e.target.value) {
                    this.billWorkRecord.vetSignature = this.vetData.signature
                } else {
                    this.billWorkRecord.vetSignature = null
                }
            },
            afterOpen() {
                this.showDragBox = false
            },
            afterClose() {
                this.showDragBox = true
            },
            //获取监督所
            getOrganization(id) {
                if (id != null) {
                    uni.request({
                        url: this.baseUrl + 'api/institution/getIndo/' + id,
                        method: "get",
                        header: {
                            "Authorization": this.Authorization,
                        },
                        success: (res) => {
                            this.organization = res.data.data;
                            this.organization.signature = JSON.parse(this.organization.signature)
                            this.organization.signature.unshift({
                                name: '无',
                                url: null
                            })
                            if (this.billWorkRecord.authority == null) {
                                this.billWorkRecord.authority = this.organization.institutionName
                            }
                            if (this.billWorkRecord.vetCertificate == null) {
                                this.billWorkRecord.vetCertificate = this.vetData.vetNumber
                            }
                        }

                    })
                }
            },
			//获取检疫对象
			getDiseaseTree() {
			        uni.request({
			            url: this.baseUrl + 'api/quarantineTime/diseaseTree',
			            method: "get",
						header: {
			               "Authorization": this.Authorization,
						},
			            success: (res) => {
							this.diseaseArr = res.data.data
			            }
			        })
			},
			//获取品种
			getBreedTree() {
			        uni.request({
			            url: this.baseUrl + 'api/quarantineTime/breedTree',
			            method: "get",
						header: {
			               "Authorization": this.Authorization,
						},
			            success: (res) => {
							this.breedArr = res.data.data
			            }
			        })
			},
            //获取兽医
            getVet() {
                uni.request({
                    url: this.baseUrl + 'api/system/sysUser/' + uni.getStorageSync("jaUserId"),
                    method: "get",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.vetData = res.data.data
                        this.getOrganization(this.vetData.organizationId)
                    }

                })
            },
            saveBillSamplNotice() {
                var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                this.billSamplNotice.snShipper = this.billWorkRecord.shipperName
                this.billSamplNotice.diseaseName = this.billWorkRecord.disease
				if(this.reasonsIns.length == 0){
					uni.showToast({
					    title: "送检原因不能为空",
					    icon: "none",
					    duration: 1000
					})
					return false
				}
                this.billSamplNotice.reasonsIns = JSON.stringify(this.reasonsIns);
                uni.showLoading({
                    title: "正在提交"
                })
                uni.request({
                    url: this.baseUrl + 'api/quarantine/samplNotice/' + this.qid,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billSamplNotice),
                    success: (res) => {
                        this.billSamplNotice.snCode = res.data.data
                        uni.hideLoading()
                        if (res.data.code == 200) {
                            this.getQuarantineList()
                            uni.showToast({
                                title: "提交成功",
                                icon: "none",
                                duration: 1000
                            })
                        }

                    },
                    fail() {
                        uni.hideLoading()
                        uni.showToast({
                            title: "提交失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },

            getInspectWhyList() {
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/system/sysDictionary/model/inspectWhy',
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        res.data.data.forEach(e => {
                            this.reasonsInsList.push({
                                value: e.dicValue,
                                name: e.dicName,
                                checked: false
                            })
                        })
                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            bindPickerChange: function (e) {
                this.diseaseArr = []
                for (var i = 0; i < 3; i++) {
                    this.diseaseArr.push(this.array[i][e.detail.value[i]])
                }
                this.billWorkRecord.disease = JSON.stringify(this.diseaseArr)
            },

            toPrintany(url) {
                var dtask = plus.downloader.createDownload(url, {}, function (d, status) {
                    // 下载完成
                    if (status == 200) {
                        plus.runtime.openFile(d.filename);
                    } else {
                        uni.showToast({
                            title: "打印失败",
                            duration: 2000,
                            icon: "none"
                        })
                    }
                });
                //dtask.addEventListener("statechanged", onStateChanged, false);
                dtask.setRequestHeader('Content-Type', 'application/pdf');
                dtask.start();
            },


            toPrint(val) {
                switch (val) {
                    case 1:
                        /* 打印工作记录单 */
                        var url = this.baseUrl + "api/quarantine/workRecord/app/preview/" + this.billQuarantine.workId
                        this.toPrintany(url)
                        break;

                    case 2:
                        /* 协助临床打印 */
                        var url = this.baseUrl + "api/quarantine/assist/app/preview/" + this.billQuarantine.assId
                        this.toPrintany(url)
                        break;
                    /* 采样送检通知单打印 */
                    case 3:
                        var url = this.baseUrl + "api/quarantine/samplNotice/app/preview/" + this.billQuarantine.samplNoticeId
                        this.toPrintany(url)
                        break;
                    /* 水产检疫处理通知单打印 */
                    case 4:
                        var url = this.baseUrl + "api/quarantine/handle/app/preview/" + this.billQuarantine.handleId
                        this.toPrintany(url)
                        break;

                    /* 隔离通知书打印 */
                    case 5:
                        var url = this.baseUrl + "api/quarantine/segregation/app/preview/" + this.billQuarantine.segregationId
                        this.toPrintany(url)
                        break;

                    /* 解除隔离通知书打印 */
                    case 6:
                        var url = this.baseUrl + "api/quarantine/desegregation/app/preview/" + this.billQuarantine.desegregationId
                        this.toPrintany(url)
                        break;
                    /* 合格证A打印 */
                    case 7:
                        var url = this.baseUrl + "api/quarantine/certification/app/preview/" + this.billQuarantine.qualificationAId +
                            "/" +
                            1
                        this.toPrintany(url)
                        break;
                    /* 合格证B打印 */
                    case 8:
                        var url = this.baseUrl + "api/quarantine/certification/app/preview/" + this.billQuarantine.qualificationBId +
                            "/" +
                            2
                        this.toPrintany(url)
                        break;
                    case 9:
                        var url = this.baseUrl + "api/quarantine/receipt/app/preview/" + this.billQuarantine.receipt1Id + "/" + 1
                        this.toPrintany(url)
                        break;
                    case 10:
                        var url = this.baseUrl + "api/quarantine/receipt/app/preview/" + this.billQuarantine.receipt2Id + "/" + 2
                        this.toPrintany(url)
                        break;

                }
            },

            delFile(val, index) {
                /* 文件未确定上传时进行删除 */
                this.tempFileList = []
                switch (val) {
                    case 1:
                        //工作记录单附件的清空
                        this.workAccessory.splice(index, 1)
                        this.billQuarantine.workAccessory = JSON.stringify(this.workAccessory)
                        this.okuploFile()
                        break;
                    case 2:
                        this.assAccessory.splice(index, 1)
                        this.billQuarantine.assAccessory = JSON.stringify(this.assAccessory)
                        this.okuploFile()
                        break;

                    case 3:
                        /* 采样送检通知附件 */
                        this.samplNoticeAccessory.splice(index, 1)
                        this.billQuarantine.samplNoticeAccessory = JSON.stringify(this.samplNoticeAccessory)
                        this.okuploFile()
                        break;

                    case 4:
                        /* 动物A证对象 */
                        this.qualificationAAccessory.splice(index, 1)
                        this.billQuarantine.qualificationAAccessory = JSON.stringify(this.qualificationAAccessory)
                        this.okuploFile()
                        break;

                    case 5:
                        this.qualificationBAccessory.splice(index, 1)
                        this.billQuarantine.qualificationBAccessory = JSON.stringify(this.qualificationBAccessory)
                        this.okuploFile()
                        break;
                    /*  动物B证附件*/
                    case 6:
                        /* 检疫处理通知单附件 */
                        this.handleAccessory.splice(index, 1)
                        this.billQuarantine.handleAccessory = JSON.stringify(this.handleAccessory)
                        this.okuploFile()
                        break;
                    case 7:
                        /* 隔离通知单附件 */
                        this.segregationAccessory.splice(index, 1)
                        this.billQuarantine.segregationAccessory = JSON.stringify(this.segregationAccessory)
                        this.okuploFile()
                        break;

                    case 8:
                        /* 解除隔离通知单附件 */
                        this.desegregationAccessory = null
                        break;

                }


            },

            /* 确定附件上传按钮 */
            okuploFile() {
                //更新BillQuarantine
                uni.request({
                    url: this.baseUrl + "api/quarantine/tenement/update",
                    method: "PUT",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billQuarantine),
                    success: (res) => {
                        uni.showToast({
                            title: "操作成功",
                            icon: "success",
                            duration: 2000
                        })
                    },
                    fail: (e) => {
                        uni.showToast({
                            title: "操作失败",
                            icon: "none",
                            duration: 2000
                        })
                    }
                })
            },


            /* 选择附件 */
            GetFileAndUp2Baidu(val) {
                uni.chooseImage({
                    success: (chooseImageRes) => {
                        const tempFilePaths = chooseImageRes.tempFilePaths[0];
                        uni.uploadFile({
                            url: this.baseUrl + 'api/upload', //仅为示例，非真实的接口地址
                            filePath: tempFilePaths,
                            name: 'file',
                            //fileType:"image",
                            success: (uploadFileRes) => {
                                var result = JSON.parse(uploadFileRes.data);
                                if (result.state = "SUCCESS") {
                                    /* 上传成功,将url 和 title 存到本地,整个页面提交时再把所有数据拼装存入数据库*/

                                    //文件上传成功后更新数据
                                    this.tempFileList = []
                                    var obj = {}
                                    obj["name"] = result.title
                                    obj["url"] = result.url
                                    this.tempFileList.push(obj)
                                    //判断时那功能的附件上传
                                    switch (val) {
                                        case 1:
                                            //现场检疫工作记录单
                                            this.workAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.workAccessory = JSON.stringify(this.workAccessory)
                                            this.okuploFile()
                                            break;

                                        case 2:

                                            this.assAccessory.push(this.tempFileList[0])
                                            /* 协助临床检查情况*/
                                            this.billQuarantine.assAccessory = JSON.stringify(this.assAccessory)
                                            this.okuploFile()
                                            break;

                                        case 3:
                                            /* 采样送检通知附件对象*/
                                            this.samplNoticeAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.samplNoticeAccessory = JSON.stringify(this.samplNoticeAccessory)
                                            this.okuploFile()
                                            break;

                                        case 4:
                                            /* 动物A证对象*/
                                            this.qualificationAAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.qualificationAAccessory = JSON.stringify(this.qualificationAAccessory)
                                            this.okuploFile()
                                            break;

                                        case 5:
                                            /* 动物B证对象*/
                                            this.qualificationBAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.qualificationBAccessory = JSON.stringify(this.qualificationBAccessory)
                                            this.okuploFile()
                                            break;

                                        case 6:
                                            /*检疫处理通知单*/
                                            this.handleAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.handleAccessory = JSON.stringify(this.handleAccessory)
                                            this.okuploFile()
                                            break;

                                        case 7:
                                            /* 隔离通知单*/
                                            this.segregationAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.segregationAccessory = JSON.stringify(this.segregationAccessory)
                                            this.okuploFile()
                                            break;

                                        case 8:
                                            /* 解除隔离通知单附件*/
                                            this.desegregationAccessory.push(this.tempFileList[0])
                                            this.billQuarantine.desegregationAccessory = JSON.stringify(this.desegregationAccessory)
                                            this.okuploFile()
                                            break;
                                    }

                                } else {
                                    uni.showToast({
                                        title: "获取文件失败",
                                        icon: "none",
                                        duration: 2000
                                    })
                                }

                            },
                            fail(e) {
                                console.log(e)
                            }
                        });
                    }
                });
            },

            /* dataUtils(dataStr, pattern) {
				return moment(dataStr).format(pattern)
			}, */

            /*  是否符合要求点击事件*/
            isCultureRecord(e) {

                this.billWorkRecord.cultureRecord = e.target.value
            },
            /* 是否有物理隔离设施点击事件 */
            isbarrierFacility(e) {
                this.billWorkRecord.barrierFacility = e.target.value
            },
            /* 群体检查是否正常店家事件 */
            isgroupResult(e) {
                this.billWorkRecord.groupResult = e.target.value
            },

            IssingleAppearance(e) {
                this.billWorkRecord.singleAppearance = e.target.value
            },
            issingleAnatomy(e) {
                this.billWorkRecord.singleAnatomy = e.target.value
            },
            issingleMicroscope(e) {
                this.billWorkRecord.singleMicroscope = e.target.value
            },
            reagentResult(e) {
                console.log(e.target.value)
                this.billWorkRecord.reagentResult = e.target.value
            },
            general(e) {
                this.billWorkRecord.general = e.target.value
            },
            harmless(e) {
                this.billWorkRecord.harmless = e.target.value
            },
            /* 协助临床检查是否发现异常点击事件 */
            assType(e) {
                this.data.assType = e.target.value
            },
            bindDecTimeTimeChange(e) {
                //console.log(e.detail.value)
                this.billSamplNotice.snTime = e.detail.value
            },
            snDataChange(e) {
                this.billSamplNotice.snData = e.detail.value
            },

            bindQuaTimeTimeChange(e) {
                this.billWorkRecord.quaTime = e.detail.value
            },
            segSourceChecked(e) {
                console.log(e.detail.value)
                this.showSegSource = e.detail.value

            },
            samplChecked(e) {
                this.reasonsIns = e.detail.value
            },
            bindSegStartTimeChange(e) {
                console.log(e.target.value + "aaaaa")
                this.billSegregation.segStartTime = e.target.value
                console.log(this.billSegregation.segStartTime + "dfeffef")
            },
            bindSegEndTime(e) {
                this.billSegregation.segEndTime = e.detail.value
            },
            bindIssuanceDate(e) {
                this.billSegregation.issuanceDate = e.target.value
            },

            bindAssTimeDateChange(e) {
                this.billAssist.assTime = e.detail.value
				
            },
            bindBillAssistRecordTimeDateChange(e) {
                this.billAssist.recordTime = e.detail.value
            },
            bindSegStartTimeDateChange(e) {
                this.billSegregation.segStartTime = e.detail.value
            },

            /* 动物A证签发日期点击事件 */
            billCertificationTimeChange(e) {
                this.billCertification.issuanceTime = e.detail.value
            },
            /* 动物A证到达有效时间 点击事件*/
            billCertificationarrivalTimeChange(e) {
                this.billCertification.arrivalTime = e.detail.value
            },

            /* 动物B证签发日期点击事件 */
            billCertificationissuanceTimeChange(e) {
                this.billCertification.issuanceTime = e.detail.value
            },
            /* 水产检疫处理通知单时间点击事件 */
            billHandleissuanceDateTimeChange(e) {
                this.billHandle.issuanceDate = e.detail.value
            },

            addSpec() {
                this.showIsolationSpec.push({
                    no: '',
                    category: '',
                    spec: '',
                    num: '',
                    exportAddress: '',
                    exportUnit: '',
                    remarks: ''
                })
                this.showIsolationSpecLength = this.showIsolationSpec.length
            },

            rmSpec() {
                this.showIsolationSpec.pop()
                this.showIsolationSpecLength = this.showIsolationSpec.length
            },

            getBillSamplNoticeList() {
                this.billSamplNotice.diseaseName = this.billWorkRecord.disease
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/quarantine/samplNotice/' + this.billQuarantine.samplNoticeId,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billSamplNotice = res.data.data;
                        if (this.billSamplNotice.reasonsIns != null && this.billSamplNotice.reasonsIns != '') {
                            this.reasonsIns = JSON.parse(this.billSamplNotice.reasonsIns)
                            this.reasonsIns.forEach(item => {
                                this.reasonsInsList.forEach(v => {
                                    if (item == v.value) {
                                        v.checked = true;
                                    }
                                })
                            })
                        }
                        var temp = JSON.parse(this.billSamplNotice.diseaseName);
                        if (temp.length > 0) {
                            temp.forEach((data, i) => {
                                if (i != temp.length - 1) {
                                    this.billSamplNoticeDiseaseName += data + '/'
                                } else {
                                    this.billSamplNoticeDiseaseName += data
                                }
                            })
                        }
                        this.organization.signature.forEach(d => {
                            if (d.url == this.billSamplNotice.signature) {
                                this.samplNoticeSignatureName = d.name
                            }
                        })
                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            //查询解除隔离通知书
            getDesegList() {
                uni.request({
                    url: this.baseUrl + 'api/quarantine/desegregation/' + this.billQuarantine.desegregationId,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billDesegregation = res.data.data;
                        this.showSegSource = JSON.parse(this.billDesegregation.desegSource);
                        this.showIsolationSpec = JSON.parse(this.billDesegregation.unisolationSpec);
                        this.showSegSource.forEach(item => {
                            this.items.forEach(v => {
                                if (item == v.value) {
                                    v.checked = true;
                                }
                            })
                        })
                        this.organization.signature.forEach(d => {
                            if (d.url == this.billDesegregation.signature) {
                                this.billDesegregationName = d.name
                            }
                        })
                    },
                    fail() {
                        uni.showToast({
                            title: "获取信息失败",
                            duration: 1000,
                            icon: "none"
                        })
                    }
                })

            },
            //隔离通知查询
            searchByJyId() {
                if (this.billQuarantine.segregationId == null) {
                    return
                }
                //console.log("查询隔离通知书方法:segregationId="+this.billQuarantine.segregationId)
                uni.request({
                    url: this.baseUrl + 'api/quarantine/segregation/' + this.billQuarantine.segregationId,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billSegregation = res.data.data;
                        if (this.billSegregation.segSource != '' && this.billSegregation.segSource != null) {
                            this.showSegSource = JSON.parse(this.billSegregation.segSource);
                        }
                        if (this.billSegregation.isolationSpec != '' && this.billSegregation.isolationSpec != null) {
                            this.showIsolationSpec = JSON.parse(this.billSegregation.isolationSpec);
                            this.showIsolationSpecLength = this.showIsolationSpec.length
                        }
                        this.showSegSource.forEach(item => {
                            this.items.forEach(v => {
                                if (item == v.value) {
                                    v.checked = true;
                                }
                            })
                        })
                        this.organization.signature.forEach(d => {
                            if (d.url == this.billSegregation.signature) {
                                this.billSegregationName = d.name
                            }
                        })
                    },
                    fail() {
                        uni.showToast({
                            title: "获取信息失败",
                            duration: 1000,
                            icon: "none"
                        })
                    }
                })
            },
            getbillReceipt() {
                uni.request({
                    url: this.baseUrl + 'api/quarantine/receipt/' + this.billQuarantine.receipt1Id,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billReceipt = res.data.data;
                    },
                    fail() {

                    }
                })
            },
            getbillReceipt2() {
                uni.request({
                    url: this.baseUrl + 'api/quarantine/receipt/' + this.billQuarantine.receipt2Id,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billReceipt2 = res.data.data;
                    },
                    fail() {

                    }
                })
            },

            //合格证查询
            getBillCertification() {
                var certificationId;
                if (this.billWorkRecord.certification == '1') {
                    certificationId = this.billQuarantine.qualificationAId;
                } else {
                    certificationId = this.billQuarantine.qualificationBId;
                }
                if (certificationId == null || certificationId == '') {
                    return
                }
                uni.request({
                    url: this.baseUrl + 'api/quarantine/certification/' + certificationId,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billCertification = res.data.data;
                        this.billCertificationVO = JSON.parse(this.billCertification.animalEarLabel);
                        this.billCertificationVOLength = this.billCertificationVO.length
                    }
                })
            },
            addOrUpdateBillCertification() {
                uni.showLoading({
                    title: "正在提交"
                })
                if (this.billWorkRecord.certification == '1') {
                    this.billCertification.certificationType = 1;
                } else {
                    this.billCertification.certificationType = 2;
                }
				// if(isNaN(this.billCertification.dayValid)){
				// 	uni.showToast({
				// 	    title: "到达有效时间为数字",
				// 	    icon: "none",
				// 	    duration: 1000
				// 	})
				// 	return false
				// }
                //获取当前登录用户
                var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                this.billCertification.animalEarLabel = JSON.stringify(this.billCertificationVO);
                this.billCertification.shipperName = this.billWorkRecord.shipperName;
                this.billCertification.shipperTel = this.billWorkRecord.decMobeltel;
                this.billCertification.animalType = this.billWorkRecord.breedName;
                this.billCertification.purpose = this.billWorkRecord.decPurpose;
                this.billCertification.productionLicenseNumber = this.billWorkRecord.plNumber;

                this.billCertification.departureAddress = this.billWorkRecord.locDeparture
                this.billCertification.arrivalAddress = this.billWorkRecord.locArrival
                this.billCertification.numUnit = this.billWorkRecord.specOrNum

                this.billCertification.departureProvince = this.billWorkRecord.departureProvince
                this.billCertification.departureCity = this.billWorkRecord.departureCity
                this.billCertification.departureArea = this.billWorkRecord.departureArea
                this.billCertification.departureStreet = this.billWorkRecord.departureStreet
                this.billCertification.departureDetail = this.billWorkRecord.departureDetail
                this.billCertification.arrivalProvince = this.billWorkRecord.arrivalProvince
                this.billCertification.arrivalCity = this.billWorkRecord.arrivalCity
                this.billCertification.arrivalArea = this.billWorkRecord.arrivalArea
                this.billCertification.arrivalStreet = this.billWorkRecord.arrivalStreet
                this.billCertification.arrivalDetail = this.billWorkRecord.arrivalDetail

                uni.request({
                    url: this.baseUrl + 'api/quarantine/certification/' + this.billQuarantine.id,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billCertification),
                    // dataType:"json",
                    success: (res) => {
                        this.billCertification.code = res.data.data
                        uni.hideLoading()
                        if (res.data.code == 200) {
                            this.getQuarantineList()
                            uni.showToast({
                                title: "提交成功",
                                icon: "none",
                                duration: 1000
                            })
                        }
                    },
                    fail() {
                        uni.hideLoading()
                        uni.showToast({
                            title: "提交失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            onLoad(option) {
                this.showPage[1] = true;
                this.qid = option.qid;
                //console.log(option.qid);
                this.Authorization = loginjs.getAuthorization();
                if (this.Authorization == null) {
                    uni.showToast({
                        title: "登录信息失效，请重新登录",
                        icon: "none",
                        duration: 1000
                    })
                    return
                }

                this.getWorkList(option.workId)
                this.getQuarantineList();
                //用途
                this.getUsageTypeList();
                //动物来源
                this.getAnimalSource()
                this.getInspectWhyList()
            },

            getWorkList(id) {
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/quarantine/workRecord/' + id,

                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
						// console.log(res)
                        this.billWorkRecord = res.data.data
						this.billWorkRecord.laboratory = 2
						var indexOf = this.billWorkRecord.breedName.lastIndexOf("/")
						this.breedName = this.billWorkRecord.breedName.substring(indexOf+1,this.billWorkRecord.breedName.length)
						var index = this.billWorkRecord.recCode.replace('渔卫检','渔卫处')
						this.billWorkRecord.treatmentNoticeNo = index
						this.fields = JSON.parse(this.billWorkRecord.disease)
                        this.getVet()
						this.getDiseaseTree()
                        /* 处理检疫对象 */
                        var disarr = JSON.parse(this.billWorkRecord.disease)
                        if (disarr.length > 0) {
                            this.addressData.coname = disarr[0]
                            this.addressData.ctname = disarr[1]
                            this.addressData.csname = disarr[2]
                        }
                        if (this.billWorkRecord.cultureRecord == null) {
                            this.billWorkRecord.cultureRecord = 1
                        }
                        if (this.billWorkRecord.barrierFacility == null) {
                            this.billWorkRecord.barrierFacility = 1
                        }
                        if (this.billWorkRecord.groupResult == null) {
                            this.billWorkRecord.groupResult = 1
                        }
                        if (this.billWorkRecord.singleAppearance == null) {
                            this.billWorkRecord.singleAppearance = 1
                        }
                        if (this.billWorkRecord.singleAnatomy == null) {
                            this.billWorkRecord.singleAnatomy = 1
                        }
                        if (this.billWorkRecord.singleMicroscope == null) {
                            this.billWorkRecord.singleMicroscope = 1
                        }
                        if (this.billWorkRecord.reagentResult == null) {
                            this.billWorkRecord.reagentResult = 1
                        }


                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }

                })
            },
			//基本信息单
            getQuarantineList(val) {
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/quarantine/tenement/' + this.qid,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billQuarantine = res.data.data
                        if (this.billQuarantine.assAccessory != null) {
                            this.assAccessory = JSON.parse(this.billQuarantine.assAccessory)
                        }
                        if (this.billQuarantine.workAccessory != null) {
                            this.workAccessory = JSON.parse(this.billQuarantine.workAccessory)
                        }
                        if (this.billQuarantine.samplNoticeAccessory != null) {
                            this.samplNoticeAccessory = JSON.parse(this.billQuarantine.samplNoticeAccessory)
                        }
                        if (this.billQuarantine.qualificationAAccessory != null) {
                            this.qualificationAAccessory = JSON.parse(this.billQuarantine.qualificationAAccessory)
                        }
                        if (this.billQuarantine.qualificationBAccessory != null) {
                            this.qualificationBAccessory = JSON.parse(this.billQuarantine.qualificationBAccessory)
                        }
                        if (this.billQuarantine.handleAccessory != null) {
                            this.handleAccessory = JSON.parse(this.billQuarantine.handleAccessory)
                        }
                        if (this.billQuarantine.segregationAccessory != null) {
                            this.segregationAccessory = JSON.parse(this.billQuarantine.segregationAccessory)
                        }
                        if (this.billQuarantine.desegregationAccessory != null) {
                            this.desegregationAccessory = JSON.parse(this.billQuarantine.desegregationAccessory)
                        }
                        if (val) {
                            this.getDesegList();
                            this.getbillReceipt2();
                        }
                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }

                })
            },
			//处理品种得显示  淡水/海水/草鱼   改为:草鱼
			        formatBreedName(value){
			            if(value == null || value === 'null'){
			                return ''
			            }
			            let result= new Array(); //定义一数组
			            result = value.split("/"); //字符分割
			            if(result != null && result.length > 0){
			                return result[result.length - 1];
			            }else{
			                return value;
			            }
			        },

            getBillAssistList() {
                if (this.billQuarantine.assId == null) {
                    return
                }
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/quarantine/assist/' + this.billQuarantine.assId,
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        if (res.data.code == 200) {
                            this.billAssist = res.data.data;
							// this.billAssist.breedName=this.formatBreedName(this.billAssist.breedName)
							var temp = this.billAssist.assTime.split(" ")
							this.billAssist.assTime = new Date(temp[0])
							console.log(this.billAssist.assTime)
                        } else {
                            uni.showToast({
                                title: "获取数据失败",
                                icon: "none",
                                duration: 1000
                            })
                        }


                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },

            addOrUpdateAssis() {
                //获取当前登录用户
                var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                uni.showLoading({
                    title: "正在提交"
                })
				console.log(this.billAssist.assTime)
				//this.billAssist.assTime = new Date(this.billAssist.assTime,'yyyy-MM-dd HH:mm');
				var ymd =this.moment(this.billAssist.assTime).format("YYYY-MM-DD")
				var hm = this.moment(new Date()).format("HH:mm")
				this.billAssist.assTime = ymd + " " + hm;
				console.log(this.billAssist.assTime)
                uni.request({
                    url: this.baseUrl + 'api/quarantine/assist/' + this.qid,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billAssist),
                    success: (res) => {
                        this.billAssist.assCode = res.data.data
                        uni.hideLoading()
                        this.getQuarantineList();

                        if (res.data.code == 200) {
                            uni.showToast({
                                title: "提交成功",
                                icon: "none",
                                duration: 1000
                            })
                        }
                    },
                    fail() {
                        uni.hideLoading()
                        uni.showToast({
                            title: "提交失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            addOrUpdateWork(index) {
                if (index == 2) {
                    this.$refs.form.validate(val => {
                        if (val) {
                            //获取当前登录用户
                            var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                            uni.showLoading({
                                title: "正在提交"
                            })
							if(this.billWorkRecord.laboratory == 1){
								if(this.billWorkRecord.laboratoryCase == null){
									uni.showToast({
									    title: "检测情况不能为空",
									    icon: "none",
									    duration: 1000
									})
									return false
								}
							}
							if(this.fields.length == 0){
								uni.showToast({
								    title: "检疫对象不能为空",
								    icon: "none",
								    duration: 1000
								})
								return false
							}else{
								this.billWorkRecord.disease =JSON.stringify(this.fields.split(';'))
							}
							if(this.billWorkRecord.quaState == null){
								uni.showToast({
								    title: "检疫结果处理不能为空",
								    icon: "none",
								    duration: 1000
								})
								return false
							}
							if(this.billWorkRecord.quaState == 1){
								if(this.billWorkRecord.qualificationType == null){
									uni.showToast({
									    title: "出具或更换不能为空",
									    icon: "none",
									    duration: 1000
									})
									return false
								}
								if(this.billWorkRecord.qualificationType == 1){
									if(this.billWorkRecord.certification == null){
										uni.showToast({
										    title: "动物合格证不能为空",
										    icon: "none",
										    duration: 1000
										})
										return false
									}
								}else if (this.billWorkRecord.qualificationType == 2) {
									if(this.billWorkRecord.certification == null){
										uni.showToast({
										    title: "《动物合格证不能为空》",
										    icon: "none",
										    duration: 1000
										})
										return false
									}
								}
							}else if (this.billWorkRecord.quaState == 2) {
								if(this.billWorkRecord.general == null){
									uni.showToast({
									    title: "一般处理不能为空",
									    icon: "none",
									    duration: 1000
									})
									return false
								}
							}
                            uni.request({
                                url: this.baseUrl + 'api/quarantine/workRecord/' + this.qid,
                                method: "PUT",
                                header: {
                                    "Authorization": this.Authorization,
                                },
                                data: JSON.stringify(this.billWorkRecord),
                                success: (res) => {
                                    uni.hideLoading()
                                    this.getQuarantineList();
                                    if (res.data.code == 200) {
                                        uni.showToast({
                                            title: "提交成功",
                                            icon: "none",
                                            duration: 1000
                                        })
                                    }
									
                                },
                                fail() {
                                    uni.hideLoading()
                                    uni.showToast({
                                        title: "提交失败",
                                        icon: "none",
                                        duration: 1000
                                    })
                                }
                            })
                        }
                    })
                } else {
                    //获取当前登录用户
                    //var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                    uni.showLoading({
                        title: "正在提交"
                    })
                    uni.request({
                        url: this.baseUrl + 'api/quarantine/workRecord/' + this.qid,
                        method: "PUT",
                        header: {
                            "Authorization": this.Authorization,
                        },
                        data: JSON.stringify(this.billWorkRecord),
                        success: (res) => {
                            uni.hideLoading()
                            this.getQuarantineList();
                            if (res.data.code == 200) {
                                uni.showToast({
                                    title: "提交成功",
                                    icon: "none",
                                    duration: 1000
                                })
                            }
                        },
                        fail() {
                            uni.hideLoading()
                            uni.showToast({
                                title: "提交失败",
                                icon: "none",
                                duration: 1000
                            })
                        }
                    })
                }

            },
            /* 更新检疫工作记录单 */

            //更新隔离通知书
            addOrUpdateSeg() {
                uni.showLoading({
                    title: "正在提交"
                })
                setTimeout(function () {
                    /* 如果5秒后获取不到数据关闭 */
                    uni.hideLoading()
                }, 6000)

                //获取当前登录用户
                var jaAuthorizationlocal = uni.getStorageSync("jaAuthorization")
                this.billSegregation.segSource = JSON.stringify(this.showSegSource)
				console.log(this.billSegregation.segSource)
				if(this.showSegSource.length == 0 ){
					uni.showToast({
					    title: "因你单位不能为空",
					    icon: "none",
					    duration: 1000
					})
					return false
				}
                this.billSegregation.isolationSpec = JSON.stringify(this.showIsolationSpec);
                console.log(this.showIsolationSpec)
                uni.request({
                    url: this.baseUrl + 'api/quarantine/segregation/' + this.qid,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billSegregation),
                    success: (res) => {
                        var reId = res.data.data.reId;
                        if (reId != null) {
                            uni.request({
                                method: "GET",
                                url: this.baseUrl + 'api/quarantine/receipt/' + reId,
                                header: {
                                    "Authorization": this.Authorization,
                                },
                                success: (res) => {
                                    this.billReceipt = res.data.data;
                                }
                            })
                        }
                        uni.hideLoading()
                        this.getQuarantineList();
                        if (res.data.code == 200) {
                            /* 测试调用获取数据方法 */
                            this.searchByJyId();
                            uni.showToast({
                                title: "提交成功",
                                icon: "none",
                                duration: 1000
                            })
                        }
                    },
                    fail() {
                        uni.hideLoading()
                        uni.showToast({
                            title: "提交失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })

            },
            /* 添加水产苗种产地检疫处理通知单 */
            addOrUpdateBiiHandle() {
                uni.showLoading({
                    title: "正在提交"
                })
                this.billHandle.hanShipper = this.billWorkRecord.shipperName
                this.billHandle.breedName = this.billWorkRecord.breedName
				if(this.billHandle.hanReason == null){
					uni.showToast({
					    title: "根据不能为空",
					    icon: "none",
					    duration: 1000
					})
					return false
				}else if (this.billHandle.hanMethods == null){
					uni.showToast({
					    title: "处理方式不能为空",
					    icon: "none",
					    duration: 1000
					})
					return false
				}
                uni.request({
                    url: this.baseUrl + 'api/quarantine/handle/' + this.qid,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    data: JSON.stringify(this.billHandle),
                    success: (res) => {
                        this.billHandle.hanCode = res.data.data
                        uni.hideLoading()
                        this.getQuarantineList();
                        uni.showToast({
                            title: "提交成功",
                            icon: "none",
                            duration: 1000
                        })
                    },
                    fail() {
                        uni.hideLoading()
                        uni.showToast({
                            title: "提交失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },


            dropdownConfirm() {

            },
            //用途集合
            getUsageTypeList() {
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/system/sysDictionary/model/usageType',
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.usageTypeList = res.data.data;
                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            decPurposeChange(e) {
                this.billWorkRecord.decPurpose = this.usageTypeList[e.detail.value].dicName
            },
            //动物来源
            getAnimalSource() {
                uni.request({
                    method: "GET",
                    url: this.baseUrl + 'api/system/sysDictionary/model/animalSource',
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.animalSourceList = res.data.data;
                    },
                    fail() {
                        uni.showToast({
                            title: "获取网络数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            decSourceChange(e) {
                this.billWorkRecord.decSource = this.animalSourceList[e.detail.value].dicName
            },
            /* 查询水产苗种产地检疫处理通知单 */
            getBillHandleL() {
                if (this.billQuarantine.handleId == null) {
                    return
                }
                uni.request({
                    url: this.baseUrl + 'api/quarantine/handle/' + this.billQuarantine.handleId,
                    method: "GET",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.billHandle = res.data.data
                        this.organization.signature.forEach(d => {
                            if (d.url == this.billHandle.signature) {
                                this.billHandleSignatureName = d.name
                            }
                        })
                    },
                    fail() {
                        uni.showToast({
                            title: "获取数据失败",
                            icon: "none",
                            duration: 1000
                        })
                    }
                })
            },
            //保存解除隔离通知单
            saveDeseg() {
                console.log(this.Authorization)
                uni.request({
                    url: this.baseUrl + 'api/quarantine/desegregation/save/' + this.billQuarantine.segregationId,
                    method: "POST",
                    header: {
                        "Authorization": this.Authorization,
                    },
                    success: (res) => {
                        this.getQuarantineList(1);
                    },
                    fail() {

                    }
                })
            },

            showPageChange(e) {
                if (e != 11) {
                    uni.pageScrollTo({
                        scrollTop: 0,
                        duration: 0
                    });
                    this.showPage = []
                    this.showMenu = false
                    this.showPage[e] = true;
                    dragBox.close()
                }
                if (e == 12) {
                    this.headerTitle = '申报信息'
                    uni.request({
                        method: "GET",
                        url: this.baseUrl + 'api/quarantine/declare/' + this.billQuarantine.decId,
                        header: {
                            "Authorization": this.Authorization,
                        },
                        success: (res) => {
                            this.declare = res.data.data;
							if(this.declare.attachment != null){
								this.attachment = JSON.parse(this.declare.attachment)
								this.urlarr = [];
								this.attachment.forEach(e => {
								this.urlarr.push({
									attachment:e.url
								})
							})
							}
							
							// this.attachment = this.attachment[0].url;
							// this.urlarr.push({attachment:this.attachment})
							// console.log(this.urlarr)
                        }
                    })

                }
                if (e == 1) {
                    this.headerTitle = '基本信息'
                }

                if (e == 2) {
                    this.headerTitle = '现场检疫工作记录单'
                }
                if (e == 3) {
                    this.headerTitle = '协助临床检查情况说明'
                    if (this.billQuarantine.assId != null) {
                        this.getBillAssistList();
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/assist/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billAssist.assCode = res.data.data;
                            }
                        })
                        this.billAssist.assShipper = this.billWorkRecord.shipperName;
                        this.billAssist.assSpecOrNum = this.billWorkRecord.specOrNum;
                        this.billAssist.decCompany = this.billWorkRecord.shipperCompany;
                        this.billAssist.breedName = this.billWorkRecord.breedName;
                        this.billAssist.assAddress = this.billWorkRecord.accAddress
                        this.billAssist.veterinaryName = this.vetData.fullName
                        this.billAssist.recordTime = new Date()
                        this.billAssist.assTime = new Date()
                        this.billAssist.assType = 1
                    }


                }
                if (e == 4) {
                    this.headerTitle = "实验室检疫工作记录单"
                }

                if (e == 7) {
                    this.headerTitle = '隔离通知单'
                    if (this.billQuarantine.segregationId != null) {
                        this.searchByJyId();
                        this.getbillReceipt()
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/segregation/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billSegregation.segCode = res.data.data;
                            }
                        })

                        this.billSegregation.segShipper = this.billWorkRecord.shipperName;
                        this.billSegregation.breedName = this.billWorkRecord.breedName;
                        this.billSegregation.segCompany = this.billWorkRecord.shipperCompany;
                        this.billSegregation.segStartTime = new Date()
                        this.billSegregation.issuanceDate = new Date()
                        this.billSegregation.segEndTime = new Date()
                        this.billSegregation.segMechanism = this.organization.institutionName
                    }
                }
                if (e == 5) {
                    this.headerTitle = '采样送检通知'
                    if (this.billQuarantine.samplNoticeId != null) {
                        this.getBillSamplNoticeList()
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/samplNotice/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billSamplNotice.snCode = res.data.data;
                            }
                        })
                        this.billSamplNotice.decCode = this.billQuarantine.decCode
                        this.billSamplNotice.diseaseName = this.billWorkRecord.disease
                        this.billSamplNotice.snShipper = this.billWorkRecord.shipperName;
                        this.billSamplNotice.snData = new Date()
                        this.billSamplNotice.snTime = new Date()
                        this.billSamplNotice.vetCertificate = this.vetData.vetNumber
                        this.billSamplNotice.authority = this.organization.institutionName
                        this.billSamplNotice.diseaseName = this.billWorkRecord.disease
                        var temp = JSON.parse(this.billSamplNotice.diseaseName);
                        if (temp.length > 0) {
							this.billSamplNoticeDiseaseName=''
                            temp.forEach((data, i) => {
                                if (i != temp.length - 1) {
                                    this.billSamplNoticeDiseaseName += data + '/'
                                } else {
                                    this.billSamplNoticeDiseaseName += data
                                }

                            })
                        }
                    }
                }
                if (e == 9) {
                    this.headerTitle = "动物检疫合格证A"
                    if (this.billQuarantine.qualificationAId != null) {
                        this.getBillCertification();
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/certification/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billCertification.code = res.data.data;
                            }
                        })
                        this.billCertification.numUnit = this.billWorkRecord.specOrNum
                        this.billCertification.deliveryWay = 1
                        this.billCertification.issuanceTime = new Date()
                    }

                }
                if (e == 10) {
                    this.headerTitle = "动物检疫合格证B"
                    if (this.billQuarantine.qualificationBId != null) {
                        this.getBillCertification();
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/certification/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billCertification.code = res.data.data;
                            }
                        })
                        this.billCertification.numUnit = this.billWorkRecord.specOrNum
                        this.billCertification.deliveryWay = 1
                        this.billCertification.issuanceTime = new Date()
                    }
                }
                if (e == 6) {
                    this.headerTitle = '水产检疫处理通知单'
                    //调用查询方法
                    if (this.billQuarantine.handleId != null) {
                        this.getBillHandleL()
                    } else {
                        uni.request({
                            method: "GET",
                            url: this.baseUrl + 'api/quarantine/handle/code/' + this.billQuarantine.id,
                            header: {
                                "Authorization": this.Authorization,
                            },
                            success: (res) => {
                                this.billHandle.hanCode = res.data.data;
                            }
                        })

                        this.billHandle.hanMechanism = this.organization.institutionName
                        this.billHandle.issuanceDate = new Date()
                    }
                }
                if (e == 8) {
                    var _this = this;
                    this.headerTitle = "解除隔离通知书"
                    if (this.billQuarantine.desegregationId != null) {
                        this.getDesegList()
                        this.getbillReceipt2()
                    }
                }
                if (e == 11) {
                    var _this = this;
                    uni.showModal({
                        title: '提示',
                        content: '复查是否通过，通过将生成解除隔离通知书',
                        success: function (res) {
                            if (res.confirm) {
                                uni.pageScrollTo({
                                    scrollTop: 0,
                                    duration: 0
                                });
                                _this.headerTitle = "解除隔离通知书"
                                _this.saveDeseg()
                                _this.showPage = []
                                _this.showMenu = false
                                _this.showPage[8] = true;
                            } else if (res.cancel) {
                            }
                        }
                    });
                }

            },
            isLaboratory(e) {
                this.billWorkRecord.laboratory = e.detail.value;
				if(this.billWorkRecord.laboratory == 2){
					this.billWorkRecord.laboratoryCase = null
				}
            },
			isLaboratoryCase(e) {
				this.billWorkRecord.laboratoryCase = e.detail.value;
				if(this.billWorkRecord.laboratory == 1 && this.billWorkRecord.laboratoryCase == 2){
					this.billWorkRecord.quaState = 2
				}
				if (this.billWorkRecord.laboratoryCase == 2) {
				    /* 	清空合格 */
				    this.billWorkRecord.qualificationType = null
				    this.billWorkRecord.certification = null
				}
			},
			/* 点击的是否合格 */
			isquaState(e) {
			    this.billWorkRecord.quaState = e.detail.value;
				if (this.billWorkRecord.quaState == 1) {
				    /* 把不合格所填的内容清空 */
				    this.billWorkRecord.unqualNumber = null
				    this.billWorkRecord.unqualSituation = null
				    this.billWorkRecord.general = null
				    this.billWorkRecord.harmless = null
				    this.billWorkRecord.harNumber = null
				    // this.billWorkRecord.treatmentNoticeNo = null
				}
				if (this.billWorkRecord.quaState == 2) {
				    /* 	清空合格 */
				    this.billWorkRecord.qualificationType = null
				    this.billWorkRecord.certification = null
				}
			},
			isQualificationType(e) {
			    // this.billWorkRecord.certification = null;
			    this.billWorkRecord.qualificationType = e.detail.value;
				if(this.billWorkRecord.qualificationType == 1){
					this.billWorkRecord.certification = null
				}
				if(this.billWorkRecord.qualificationType == 2){
					this.billWorkRecord.certification = null
				}
			},
			isCertification(e) {
			    this.billWorkRecord.certification = e.detail.value;
			},
            childClick(e) {
                this.billWorkRecord.disease = JSON.stringify(e)
            },
            isquaStateok2(e) {
                var value = e.detail.value;
                this.billWorkRecord.quaState = value;
                if (value == 1) {
                    /* 把不合格所填的内容清空 */
                    this.billWorkRecord.unqualNumber = null
                    this.billWorkRecord.unqualSituation = null
                    this.billWorkRecord.general = null
                    this.billWorkRecord.harmless = null
                    this.billWorkRecord.harNumber = null
                    this.billWorkRecord.treatmentNoticeNo = null
                }
                if (value == 2) {
                    /* 	清空合格 */
                    this.billWorkRecord.qualificationType = null
                    this.billWorkRecord.certification = null
                }
            },
           
            deliveryWayChange(e) {
                this.billCertification.deliveryWay = e.detail.value;
            },
            clickLeft() {
                uni.navigateBack({
                    url: 'pages/index/index'
                })
            },

            clickRight() {
                if (this.showDragBox) {
                    dragBox.open()
                } else {
                    dragBox.close()
                }

            },
            arrayChange(e) {

            },
            objectChange(e) {

            },

            /* 动态添加表格行 */
            addtd() {
                this.billCertificationVO.push({
                    qcNumber: '',
                    spec: '',
                    number: ''
                })
                this.billCertificationVOLength = this.billCertificationVO.length
            },
            /* 动态删除表格行 */
            deltd() {
                this.billCertificationVO.pop();
                this.billCertificationVOLength = this.billCertificationVO.length
            },
			//检疫对象确定回调事件
			diseaseTreeConfirm(e) {
				e.forEach(j=>{
					this.fields += j.name + ';'
				})
				if(this.fields.length>0){
					this.fields = this.fields.substring(0, this.fields.length - 1);
				}
			},
			////品种确定回调事件
			breedTreeConfirm(e) {
				console.log(e)
			},
			// 取消回调事件
			treeCancel(e) {
				console.log(e)
			},
			// 显示树形选择器
			showTree() {
				this.$refs.tkitree._show();
			},
			empty(){
				this.fields = ''
			},
        },

    }
</script>

<style>
    .deseg {
        border-bottom: 2 upx solid #0077AA;
    }

    .showClass {
        background-color: #1E90FF;
    }

    /* input {
		height: 30px;
		padding: 0 10px;
	}
 */
    .showEventCalss {
        pointer-events: none;
    }


    .items .title {
        margin-top: 3%;
    }

    .pickerstyle {
        height: 70 upx;
        display: block;
        padding: 0 10px;
        border-radius: 10 upx;
        border: 1 upx solid #ccc;
        padding-top: 3px;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }


    .items input {

        border: 1 upx solid #ccc;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
        border-radius: 10 upx;
        margin-bottom: 3%;
        height: 70 upx;
        padding: 0 10px;
    }

    .items input:focus {
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
    }

    .items textarea {
        border: 1 upx solid #ccc;
        border-radius: 10 upx;
        margin-bottom: 3%;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }

    .geStyle {
        height: 70 upx;
        border: 1 upx solid #ccc;
        border-radius: 10 upx;
        margin-bottom: 3%;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }

    .waterStyle {
        float: left;
        width: 48%;
    }

    .example-body {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        font-size: 14px;
        background-color: #ffffff;
    }

    .bjx-form-item .label-block .item-label .label-con[data-v-70189c1a] {
        font-size: 105%;
    }
	input {
		border: 1px solid #909399;
	}
</style>
